Skip to content

Reassembly Chamber (Calculator)

Description

Converts an input itemstack into an output itemstack, typically a Damaged Circuit.

Identifier

Refer to this via any of the following:

groovy
mods.calculator.reassembly_chamber/* Used as page default */
mods.calculator.reassemblychamber
mods.calculator.reassemblyChamber
mods.calculator.ReassemblyChamber

Adding Recipes

Recipe Builder

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

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

mods.calculator.reassembly_chamber.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>)
  • 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 sonar.calculator.mod.common.recipes.CalculatorRecipe).

    groovy
    register()
Example
groovy
mods.calculator.reassembly_chamber.recipeBuilder()
    .input(item('minecraft:clay'))
    .output(item('minecraft:diamond'))
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

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

    groovy
    mods.calculator.reassembly_chamber.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.calculator.reassembly_chamber.removeAll()
Example
groovy
mods.calculator.reassembly_chamber.removeByInput(item('calculator:circuitdamaged:12'))
mods.calculator.reassembly_chamber.removeByOutput(item('calculator:circuitboard:13'))
mods.calculator.reassembly_chamber.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.calculator.reassembly_chamber.streamRecipes()

© 2024 CleanroomMC. All Rights Reserved.