Magma Crucible (Thermal Expansion)
Description
Converts an input itemstack into an output itemstack, costing power and taking time based on the power cost.
Identifier
Refer to this via any of the following:
mods.thermal.crucible
mods.thermal.Crucible
mods.thermalexpansion.crucible/* Used as page default */
mods.thermalexpansion.Crucible
Adding Recipes
Adds recipes in the format
energy
,input
,fluidOutput
:groovymods.thermalexpansion.crucible.add(int, IIngredient, FluidStack)
Example
mods.thermalexpansion.crucible.add(1000, item('minecraft:obsidian'), fluid('water') * 1000)
Recipe Builder
Just like other recipe types, the Magma Crucible also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thermalexpansion.crucible.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
FluidStackList
. Sets the fluid outputs of the recipe. Requires exactly 1.groovyfluidOutput(FluidStack) fluidOutput(FluidStack...) fluidOutput(Collection<FluidStack>)
int
. Sets the energy cost of the recipe. Requires greater than 0. (DefaultCrucibleManager.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.CrucibleManager$CrucibleRecipe
).groovyregister()
Example
mods.thermalexpansion.crucible.recipeBuilder()
.input(item('minecraft:clay'))
.fluidOutput(fluid('lava') * 25)
.register()
mods.thermalexpansion.crucible.recipeBuilder()
.input(item('minecraft:diamond'))
.fluidOutput(fluid('water') * 1000)
.energy(1000)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.thermalexpansion.crucible.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.thermalexpansion.crucible.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.thermalexpansion.crucible.removeAll()
Example
mods.thermalexpansion.crucible.removeByInput(item('minecraft:glowstone_dust'))
mods.thermalexpansion.crucible.removeByOutput(fluid('lava'))
mods.thermalexpansion.crucible.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.crucible.streamRecipes()