Skip to content

Frostfire (Bewitchment)

Description

Converts an input ingredient into an output itemstack once a second while inside a Frostfire block.

Identifier

Refer to this via any of the following:

groovy
mods.bewitchment.frostfire/* Used as page default */
mods.bewitchment.Frostfire

Adding Recipes

  • Adds the recipe:

    groovy
    mods.bewitchment.frostfire.add(FrostfireRecipe)

Recipe Builder

Just like other recipe types, the Frostfire also uses a recipe builder.

Don't know what a builder is? Check the builder info page out.

Recipe Builder
  • Create the Recipe Builder.

    groovy
    mods.bewitchment.frostfire.recipeBuilder()

  • ResourceLocation. Sets the Resource Location of the recipe.

    groovy
    name(String)
    name(ResourceLocation)
  • 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>)

  • 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.bewitchment.api.registry.FrostfireRecipe).

    groovy
    register()

Example
groovy
mods.bewitchment.frostfire.recipeBuilder()
    .input(item('minecraft:water_bucket'))
    .output(item('minecraft:ice'))
    .register()

Removing Recipes

  • Removes the recipe with the given Resource Location:

    groovy
    mods.bewitchment.frostfire.remove(ResourceLocation)
  • Removes the recipe with the given String as its Resource Location:

    groovy
    mods.bewitchment.frostfire.remove(String)
  • Removes the recipe:

    groovy
    mods.bewitchment.frostfire.remove(FrostfireRecipe)
  • Removes all recipes that match the given input:

    groovy
    mods.bewitchment.frostfire.removeByInput(IIngredient)
  • Removes all recipes that match the given output:

    groovy
    mods.bewitchment.frostfire.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.bewitchment.frostfire.removeAll()
Example
groovy
mods.bewitchment.frostfire.removeByInput(item('minecraft:iron_ore'))
mods.bewitchment.frostfire.removeByOutput(item('bewitchment:cold_iron_ingot'))
mods.bewitchment.frostfire.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
    mods.bewitchment.frostfire.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.