Crusher (Immersive Engineering)
Description
Converts an input itemstack into an output itemstack, consuming energy.
Identifier
Refer to this via any of the following:
mods.ie.crusher
mods.ie.Crusher
mods.immersiveengineering.crusher/* Used as page default */
mods.immersiveengineering.Crusher
Adding Recipes
Adds recipes in the format
output
,input
,energy
:groovymods.immersiveengineering.crusher.add(ItemStack, IIngredient, int)
Recipe Builder
Just like other recipe types, the Crusher also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.immersiveengineering.crusher.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.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>)
int
. Sets the amount of power consumed to complete the recipe. Requires greater than or equal to 0. (Default0
).groovyenergy(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
orblusunrize.immersiveengineering.api.crafting.CrusherRecipe
).groovyregister()
Example
mods.immersiveengineering.crusher.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:clay'))
.energy(100)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.immersiveengineering.crusher.removeByInput(ItemStack)
Removes all recipes that match the given output:
groovymods.immersiveengineering.crusher.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.immersiveengineering.crusher.removeAll()
Example
mods.immersiveengineering.crusher.removeByInput(item('immersiveengineering:material:7'))
mods.immersiveengineering.crusher.removeByOutput(item('minecraft:sand'))
mods.immersiveengineering.crusher.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.immersiveengineering.crusher.streamRecipes()