Health Processor (Calculator)
Description
Converts an input itemstack into "Health Points", which charge a Health or Nutrition module and are converted into rapidly regenerating health.
Identifier
Refer to this via any of the following:
mods.calculator.health_processor/* Used as page default */
mods.calculator.healthprocessor
mods.calculator.healthProcessor
mods.calculator.HealthProcessor
Adding Recipes
Recipe Builder
Just like other recipe types, the Health Processor also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.calculator.health_processor.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
int
. Sets the amount of "Health Points" gained. Requires greater than or equal to 1. (Default0
).groovyvalue(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. (returnsnull
orsonar.core.recipes.DefaultSonarRecipe$Value
).groovyregister()
Example
mods.calculator.health_processor.recipeBuilder()
.input(item('minecraft:clay'))
.value(100)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.calculator.health_processor.removeByInput(IIngredient)
Removes all registered recipes:
groovymods.calculator.health_processor.removeAll()
Example
mods.calculator.health_processor.removeByInput(item('minecraft:blaze_rod'))
mods.calculator.health_processor.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.health_processor.streamRecipes()