Refinery (Immersive Engineering)
Description
Converts 2 input fluidstacks into an output fluidstack, consuming power.
Identifier
Refer to this via any of the following:
mods.ie.refinery
mods.ie.Refinery
mods.immersiveengineering.refinery/* Used as page default */
mods.immersiveengineering.Refinery
Adding Recipes
Adds recipes in the format
output
,input0
,input1
,energy
:groovymods.immersiveengineering.refinery.add(FluidStack, FluidStack, FluidStack, int)
Recipe Builder
Just like other recipe types, the Refinery also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.immersiveengineering.refinery.recipeBuilder()
FluidStackList
. Sets the fluid inputs of the recipe. Requires exactly 2.groovyfluidInput(FluidStack) fluidInput(FluidStack...) fluidInput(Collection<FluidStack>)
FluidStackList
. Sets the fluid outputs of the recipe. Requires exactly 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.RefineryRecipe
).groovyregister()
Example
mods.immersiveengineering.refinery.recipeBuilder()
.fluidInput(fluid('water'), fluid('water'))
.fluidOutput(fluid('lava'))
.energy(100)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.immersiveengineering.refinery.removeByInput(FluidStack, FluidStack)
Removes all recipes that match the given output:
groovymods.immersiveengineering.refinery.removeByOutput(FluidStack)
Removes all registered recipes:
groovymods.immersiveengineering.refinery.removeAll()
Example
mods.immersiveengineering.refinery.removeByInput(fluid('plantoil'), fluid('ethanol'))
mods.immersiveengineering.refinery.removeByOutput(fluid('biodiesel'))
mods.immersiveengineering.refinery.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.refinery.streamRecipes()