Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Custom Furnace Recipes

Michael Weatherby edited this page Aug 26, 2020 · 11 revisions

Give the input item the nbt tag du_smelt_id:X, where X is a unique integer (ie. give @s stick{du_smelt_id:250}). Best to make it arbitrarily high to avoid conflicts.

Then, extend the function tag #du:recipes/<furnace/smoker/blast_furnace/campfire> with your recipe function(s) (You can add the same function to multiple tags if you want it to run for multiple furnace types). Copy this line of code for each recipe in the function:

For furnaces: 
execute if score $crafting.in_0 du_data matches <item smelt id> run replaceitem block ~ ~ ~ container.2 <output>{<nbt>}
For campfires: 
execute if score $crafting.in_0 du_data matches <item smelt id> run summon item ~ ~ ~ {<item>}

Note that this system only supports custom items with the special tag, and currently cannot be used to add recipes for other items (i.e. normal minecraft tools). This is to prevent lag, and will most likely not change.

Using API on a Custom Furnace

If you have a custom furnace (for example, the Electric Furnace from Mechanization), then give the marker entity the tag du_furnace. Not 100% guaranteed to work, but it should be able to use the custom recipes.

Relevant Code Locations