Atomic Calculator (Calculator)
Description
Converts three input itemstacks into one output itemstack.
Identifier
Refer to this via any of the following:
mods.calculator.atomic_calculator/* Used as page default */
mods.calculator.atomiccalculator
mods.calculator.atomicCalculator
mods.calculator.AtomicCalculator
Adding Recipes
Recipe Builder
Just like other recipe types, the Atomic Calculator also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.calculator.atomic_calculator.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 3.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(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. (returnsnull
orsonar.calculator.mod.common.recipes.CalculatorRecipe
).groovyregister()
Example
mods.calculator.atomic_calculator.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
.output(item('minecraft:gold_ingot') * 4)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.calculator.atomic_calculator.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.calculator.atomic_calculator.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.calculator.atomic_calculator.removeAll()
Example
mods.calculator.atomic_calculator.removeByInput(item('minecraft:end_stone'))
mods.calculator.atomic_calculator.removeByOutput(item('calculator:firediamond'))
mods.calculator.atomic_calculator.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:
groovymods.calculator.atomic_calculator.streamRecipes()