Skip to content

Wind Rune (EssentialCraft 4)

Description

Transforms various items using ESPE.

Identifier

Refer to this via any of the following:

groovy
mods.ec4.wind_rune
mods.ec4.windrune
mods.ec4.windRune
mods.ec4.WindRune
mods.essentialcraft.wind_rune/* Used as page default */
mods.essentialcraft.windrune
mods.essentialcraft.windRune
mods.essentialcraft.WindRune

Adding Recipes

Recipe Builder

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

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

mods.essentialcraft.wind_rune.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>)
  • int. Sets the ESPE cost for this recipe. Requires greater than or equal to 1. (Default 0).

    groovy
    espe(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. (returns null or essentialcraft.api.WindImbueRecipe).

    groovy
    register()
Example
groovy
mods.essentialcraft.wind_rune.recipeBuilder()
    .input(item('minecraft:gold_block'))
    .output(item('minecraft:diamond_block'))
    .espe(500)
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

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

    groovy
    mods.essentialcraft.wind_rune.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.essentialcraft.wind_rune.removeAll()
Example
groovy
mods.essentialcraft.wind_rune.removeByInput(item('minecraft:diamond'))
mods.essentialcraft.wind_rune.removeByOutput(item('essentialcraft:air_potion'))
mods.essentialcraft.wind_rune.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.essentialcraft.wind_rune.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.