Skip to content

Crystal Energization (LazyAE2)

Description

Converts 1 input itemstack into an output itemstack, consuming a set amount of energy.

Identifier

Refer to this via any of the following:

groovy
mods.threng.energizer/* Used as page default */
mods.threng.Energizer
mods.lazyae2.energizer
mods.lazyae2.Energizer

Adding Recipes

  • Add the given recipe to the recipe list:

    groovy
    mods.threng.energizer.add(EnergizeRecipe)

Recipe Builder

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

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

mods.threng.energizer.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 amount of energy consumed by the recipe. Requires greater than 0. (Default 0).

    groovy
    energy(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 io.github.phantamanta44.threng.recipe.EnergizeRecipe).

    groovy
    register()
Example
groovy
mods.threng.energizer.recipeBuilder()
    .input(ore('blockGlass'))
    .energy(50)
    .output(item('minecraft:diamond'))
    .register()

mods.threng.energizer.recipeBuilder()
    .input(item('minecraft:gold_ingot'))
    .energy(10000)
    .output(item('minecraft:diamond'))
    .register()

Removing Recipes

  • Removes the given recipe from the recipe list:

    groovy
    mods.threng.energizer.remove(EnergizeRecipe)
  • Removes all recipes that match the given input:

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

    groovy
    mods.threng.energizer.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.threng.energizer.removeAll()
Example
groovy
mods.threng.energizer.removeByInput(item('appliedenergistics2:material'))
mods.threng.energizer.removeByOutput(item('appliedenergistics2:material:1'))
mods.threng.energizer.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.threng.energizer.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.