Furnace (Minecraft)
Description
Converts an input item into an output itemstack after a configurable amount of time, with the ability to give experience and using fuel to run. Can also convert the item in the fuel slot.
Note
Fuel Conversion Recipes may not function as desired in all furnaces - only the vanilla furnace has specific support. By default the only recipe reproduces the vanilla behavior of a wet sponge converting an empty bucket into a water bucket.
Identifier
Refer to this via any of the following:
furnace/* Used as page default */
Furnace
minecraft.furnace
minecraft.Furnace
Minecraft.furnace
Minecraft.Furnace
vanilla.furnace
vanilla.Furnace
Vanilla.furnace
Vanilla.Furnace
mods.mc.furnace
mods.mc.Furnace
mods.vanilla.furnace
mods.vanilla.Furnace
mods.minecraft.furnace
mods.minecraft.FurnaceAdding Recipes
Adds a recipe in the format
input,output:groovyfurnace.add(IIngredient, ItemStack)Adds a recipe in the format
input,output,experience:groovyfurnace.add(IIngredient, ItemStack, float)Adds a recipe in the format
input,output,experience,time:groovyfurnace.add(IIngredient, ItemStack, float, int)Add the given recipe to the recipe list:
groovyfurnace.addFuelConversion(CustomFurnaceManager.FuelConversionRecipe)Add a conversion recipe in the format
smelted,fuel, withfuelusing an IIngredient transformer:groovyfurnace.addFuelConversion(IIngredient, IIngredient)
Example
furnace.add(ore('ingotIron'), item('minecraft:diamond'))
furnace.add(item('minecraft:nether_star'), item('minecraft:clay') * 64, 13)
furnace.add(item('minecraft:diamond'), item('minecraft:clay'), 2, 50)
furnace.addFuelConversion(item('minecraft:diamond'), item('minecraft:bucket').transform(item('minecraft:lava_bucket')))Recipe Builder
Just like other recipe types, the Furnace also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovyfurnace.recipeBuilder()
IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)ItemStackList. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)float. Sets the experience rewarded for smelting the given input. Requires greater than or equal to 0. (Default0.1f).groovyexp(float) experience(float)int. Sets the time in ticks the recipe takes. Requires greater than or equal to 1. (Default200).groovytime(int)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullorcom.cleanroommc.groovyscript.compat.vanilla.Furnace$Recipe).groovyregister()
Example
furnace.recipeBuilder()
.input(ore('ingotGold'))
.output(item('minecraft:nether_star'))
.exp(0.5)
.register()Removing Recipes
Removes all recipes that match the given input:
groovyfurnace.removeByInput(IIngredient)Removes all recipes that match the given output:
groovyfurnace.removeByOutput(IIngredient)Removes the given recipe from the recipe list:
groovyfurnace.removeFuelConversion(CustomFurnaceManager.FuelConversionRecipe)Removes all conversion recipes with the given smelted item:
groovyfurnace.removeFuelConversionBySmeltedStack(ItemStack)Removes all registered recipes:
groovyfurnace.removeAll()Removes all conversion recipes:
groovyfurnace.removeAllFuelConversions()
Example
furnace.removeByInput(item('minecraft:clay:*'))
furnace.removeByOutput(item('minecraft:brick'))
furnace.removeFuelConversionBySmeltedStack(item('minecraft:sponge', 1))
furnace.removeAll()
furnace.removeAllFuelConversions()Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovyfurnace.streamFuelConversions()Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovyfurnace.streamRecipes()
