Skip to content

Materialization (Abyssal Tweaker)

Description

Turns Crystals from a Crystal Bag into an output item.

Warning

The Materializer compatibility requires that all input items are Abyssalcraft crystals. This is checked via looking at the first entry of getMatchingStacks, which is then used as the input item. This means the IIngredient used should be obtained via the item Object Mapper.

Identifier

Refer to this via any of the following:

groovy
mods.abyssaltweaker.materialization/* Used as page default */
mods.abyssaltweaker.Materialization

Adding Recipes

Recipe Builder

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

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

mods.abyssaltweaker.materialization.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.

    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.shinoow.abyssalcraft.api.recipe.Materialization).

    groovy
    register()
Example
groovy
mods.abyssaltweaker.materialization.recipeBuilder()
    .input(item('abyssalcraft:coralium_crystal'))
    .output(item('minecraft:diamond'))
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

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

    groovy
    mods.abyssaltweaker.materialization.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.abyssaltweaker.materialization.removeAll()
Example
groovy
mods.abyssaltweaker.materialization.removeByInput(item('abyssalcraft:phosphorus_crystal'))
mods.abyssaltweaker.materialization.removeByOutput(item('minecraft:bone'))
mods.abyssaltweaker.materialization.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.abyssaltweaker.materialization.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.