Furnace (Extra Utilities 2)
Description
Converts an input itemstack into an output itemstack, consuming energy.
Warning
When removing items, keep in mind that the default registry mostly contains INPUT items allowing any metadata. This means you cannot do item('minecraft:emerald_ore')
and instead must do item('minecraft:emerald_ore:*')
.
Identifier
Refer to this via any of the following:
mods.extrautils2.furnace/* Used as page default */
mods.extrautils2.Furnace
mods.extrautilities2.furnace
mods.extrautilities2.Furnace
Adding Recipes
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.
mods.extrautils2.furnace.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>)
int
. Sets the time in ticks the recipe takes. Requires greater than 0. (Default0
).groovytime(int)
int
. Sets the energy cost of the recipe. Requires greater than or equal to 0. (Default0
).groovyenergy(int)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orcom.rwtema.extrautils2.api.machine.IMachineRecipe
).groovyregister()
Example
mods.extrautils2.furnace.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.energy(1000)
.time(5)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.extrautils2.furnace.removeByInput(IIngredient)
Removes all registered recipes:
groovymods.extrautils2.furnace.removeAll()
Example
mods.extrautils2.furnace.removeByInput(item('minecraft:emerald_ore:*'))
mods.extrautils2.furnace.removeAll()
Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.extrautils2.furnace.streamRecipes()