A Minecraft Datapack adding the ability to add smelting recipes with NBT data for input and output items. Currently handles:
Requires LanternLoad to run.
These are scoreboard objectives used to represent a value of some kind.
nbt_smelting.data
Used for math and passing variables between functions.
NBT Data to add to items to enable certain functionality
Item.component."minecraft:custom_data"{nbt_smelting:1b}
Indicates this item has a custom recipe, triggering the custom smelt functions when the item is in a furnace.
Note: to place an item on a campfire, a valid vanilla recipe must exist. It is recommended to add a recipe that smelts
the item into itself if a real item, ie. minecraft:diamond -> minecraft:diamond, or into air if a technical item,
ie. minecraft:command_block -> minecraft:air
Function tags are called by NBT Smelting to let you know you should do something.
function #nbt_smelting:v1/furnace
function #nbt_smelting:v1/blast_furnace
function #nbt_smelting:v1/smoker
function #nbt_smelting:v1/campfire
Triggered when a respective block has compelted a recipe
Input:
storage nbt_smelting:io item -> input item
Output:
For the furnace, set the item in slot 2 (output slot) to the desired output.
ie. execute if data storage nbt_smelting:io item{id:"minecraft:diamond"} run item replace block ~ ~ ~ with minecraft:dirt
Note /loot has problems replacing items in a furnace. As a workaround, you can place the item in an
inventory somewhere and copy it into the furnace with /item.
For campfires, spawn the item in the world (as if it had just popped off from a normal recipe finishing).
NBTSmelting/data/nbt_smelting
folder into your data packNBTSmelting/data/load/tags/functions/*
into the files at <your_datapack>/data/load/tags/functions/*
For easier mangament of dependencies, check out my project Datapack Build Manager.
Copyright © 2024 Smithed
Not an official Minecraft product. Not approved by or associated with Mojang Studios