Fluid Transposer - Empty (Thermal Expansion)
Description
Converts an input itemstack into an output fluidstack and optional output itemstack with chance, costing power and taking time based on the power cost.
Note
Does not alter fill/empty container recipes.
Identifier
Refer to this via any of the following:
mods.thermal.transposer_extract
mods.thermal.transposerextract
mods.thermal.transposerExtract
mods.thermal.TransposerExtract
mods.thermalexpansion.transposer_extract/* Used as page default */
mods.thermalexpansion.transposerextract
mods.thermalexpansion.transposerExtract
mods.thermalexpansion.TransposerExtract
Adding Recipes
Adds recipes in the format
energy
,input
,outputFluid
,outputItem
,chance
:groovymods.thermalexpansion.transposer_extract.add(int, IIngredient, FluidStack, ItemStack, int)
Example
mods.thermalexpansion.transposer_extract.add(1000, item('minecraft:obsidian'), fluid('water') * 50, item('minecraft:diamond') * 2, 100)
Recipe Builder
Just like other recipe types, the Fluid Transposer - Empty also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thermalexpansion.transposer_extract.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 exactly 1.groovyfluidOutput(FluidStack) fluidOutput(FluidStack...) fluidOutput(Collection<FluidStack>)
int
. Sets the chance the output itemstack is created. Requires greater than or equal to 0 and less than or equal to 100. (Default0
).groovychance(int)
int
. Sets the energy cost of the recipe. Requires greater than 0. (DefaultTransposerManager.DEFAULT_ENERGY
).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
orcofh.thermalexpansion.util.managers.machine.TransposerManager$TransposerRecipe
).groovyregister()
Example
mods.thermalexpansion.transposer_extract.recipeBuilder()
.input(item('minecraft:diamond') * 2)
.fluidOutput(fluid('water') * 100)
.register()
mods.thermalexpansion.transposer_extract.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond') * 2)
.fluidOutput(fluid('water') * 50)
.energy(1000)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.thermalexpansion.transposer_extract.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.thermalexpansion.transposer_extract.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.thermalexpansion.transposer_extract.removeAll()
Example
mods.thermalexpansion.transposer_extract.removeByInput(item('minecraft:sponge:1'))
mods.thermalexpansion.transposer_extract.removeByOutput(fluid('seed_oil'))
mods.thermalexpansion.transposer_extract.removeByOutput(item('minecraft:bowl'))
mods.thermalexpansion.transposer_extract.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.thermalexpansion.transposer_extract.streamRecipes()