Skip to content

Furnace (Minecraft)

Description

Converts an input item into an output itemstack after a set amount of time, with the ability to give experience and using fuel to run.

Identifier

Refer to this via any of the following:

groovy
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.Furnace

Adding Recipes

  • Adds a recipe in the format input, output:

    groovy
    furnace.add(IIngredient, ItemStack)
  • Adds a recipe in the format input, output, experience:

    groovy
    furnace.add(IIngredient, ItemStack, float)
Example
groovy
furnace.add(ore('ingotIron'), item('minecraft:diamond'))
furnace.add(item('minecraft:nether_star'), item('minecraft:clay') * 64, 13)

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.

furnace.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires exactly 1.

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • ItemStackList. Sets the item outputs of the recipe. Requires exactly 1.

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • float. Sets the experience rewarded for smelting the given input. Requires greater than or equal to 0. (Default 0.0f).

    groovy
    exp(float)
  • 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. (returns null or com.cleanroommc.groovyscript.compat.vanilla.Furnace$Recipe).

    groovy
    register()
Example
groovy
furnace.recipeBuilder()
    .input(ore('ingotGold'))
    .output(item('minecraft:nether_star'))
    .exp(0.5)
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

    groovy
    furnace.removeByInput(ItemStack)
  • Removes all recipes that match the given output:

    groovy
    furnace.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    furnace.removeAll()
Example
groovy
furnace.removeByInput(item('minecraft:clay'))
furnace.removeByOutput(item('minecraft:brick'))
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:

    groovy
    furnace.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.