Induction Smelter (Thermal Expansion)
Description
Converts two input itemstacks into an output itemstack and optional output itemstack with a chance, costing power and taking time based on the power cost.
Identifier
Refer to this via any of the following:
mods.thermal.smelter
mods.thermal.Smelter
mods.thermalexpansion.smelter/* Used as page default */
mods.thermalexpansion.Smelter
Adding Recipes
Adds recipes in the format
energy
,input0
,input1
,output0
,output1
,chance
:groovymods.thermalexpansion.smelter.add(int, IIngredient, IIngredient, ItemStack, ItemStack, int)
Adds an item to the Metallurgic Flux list, which filters the inputs for one of the Induction Smelter slots when enabled:
groovymods.thermalexpansion.smelter.addFlux(ItemStack)
Example
mods.thermalexpansion.smelter.add(1000, item('minecraft:obsidian'), item('minecraft:gold_ingot') * 2, item('minecraft:clay'), item('minecraft:diamond'), 5)
Recipe Builder
Just like other recipe types, the Induction Smelter also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thermalexpansion.smelter.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 2.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires greater than or equal to 1 and less than or equal to 2.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
int
. Sets the chance the second 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. (DefaultSmelterManager.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.SmelterManager$SmelterRecipe
).groovyregister()
Example
mods.thermalexpansion.smelter.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:diamond'))
.output(item('minecraft:diamond') * 4)
.register()
mods.thermalexpansion.smelter.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:gold_ingot') * 2)
.output(item('minecraft:clay'), item('minecraft:diamond'))
.chance(5)
.energy(1000)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.thermalexpansion.smelter.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.thermalexpansion.smelter.removeByOutput(IIngredient)
Removes an item from the Metallurgic Flux list, which filters the inputs for one of the Induction Smelter slots when enabled:
groovymods.thermalexpansion.smelter.removeFlux(ItemStack)
Removes all registered recipes:
groovymods.thermalexpansion.smelter.removeAll()
Example
mods.thermalexpansion.smelter.removeByInput(ore('sand'))
mods.thermalexpansion.smelter.removeByInput(item('minecraft:iron_ingot'))
mods.thermalexpansion.smelter.removeByOutput(item('thermalfoundation:material:166'))
mods.thermalexpansion.smelter.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.smelter.streamRecipes()