Squeezer (Immersive Engineering)
Description
Converts an input itemstack into either an output itemstack, fluidstack, or both, using energy.
Identifier
Refer to this via any of the following:
mods.ie.squeezer
mods.ie.Squeezer
mods.immersiveengineering.squeezer/* Used as page default */
mods.immersiveengineering.Squeezer
Adding Recipes
Add the given recipe to the recipe list:
groovymods.immersiveengineering.squeezer.add(SqueezerRecipe)
Adds recipes in the format
fluidOutput
,itemOutput
,input
,energy
:groovymods.immersiveengineering.squeezer.add(FluidStack, ItemStack, IIngredient, int)
Recipe Builder
Just like other recipe types, the Squeezer also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.immersiveengineering.squeezer.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 greater than or equal to 0 and less than or equal to 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
FluidStackList
. Sets the fluid outputs of the recipe. Requires greater than or equal to 0 and less than or equal to 1.groovyfluidOutput(FluidStack) fluidOutput(FluidStack...) fluidOutput(Collection<FluidStack>)
int
. Sets the amount of power consumed to complete the recipe. (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.SqueezerRecipe
).groovyregister()
Example
mods.immersiveengineering.squeezer.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:clay'))
.fluidOutput(fluid('lava'))
.energy(100)
.register()
mods.immersiveengineering.squeezer.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.energy(100)
.register()
mods.immersiveengineering.squeezer.recipeBuilder()
.input(item('minecraft:clay'))
.fluidOutput(fluid('water'))
.energy(100)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.immersiveengineering.squeezer.remove(SqueezerRecipe)
Removes all recipes that match the given input:
groovymods.immersiveengineering.squeezer.removeByInput(ItemStack)
Removes all recipes that match the given output:
groovymods.immersiveengineering.squeezer.removeByOutput(FluidStack)
Removes all recipes that match the given output:
groovymods.immersiveengineering.squeezer.removeByOutput(FluidStack, ItemStack)
Removes all recipes that match the given output:
groovymods.immersiveengineering.squeezer.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.immersiveengineering.squeezer.removeAll()
Example
mods.immersiveengineering.squeezer.removeByInput(item('minecraft:wheat_seeds'))
mods.immersiveengineering.squeezer.removeByOutput(fluid('plantoil'))
mods.immersiveengineering.squeezer.removeByOutput(item('immersiveengineering:material:18'))
mods.immersiveengineering.squeezer.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.squeezer.streamRecipes()