Sawmill (Thermal Expansion)
Description
Converts an input itemstack into an output itemstack and optional output itemstack with a chance, costing power and taking time based on the power cost.
Note
The valid items and fluid output while the Resin Funnel Augment is installed is controlled by the Arboreal Extractor device.
Identifier
Refer to this via any of the following:
mods.thermal.sawmill
mods.thermal.Sawmill
mods.thermalexpansion.sawmill/* Used as page default */
mods.thermalexpansion.Sawmill
Adding Recipes
Adds recipes in the format
energy
,input
,outputItem
,secondaryOutput
,chance
:groovymods.thermalexpansion.sawmill.add(int, IIngredient, ItemStack, ItemStack, int)
Example
mods.thermalexpansion.sawmill.add(1000, item('minecraft:obsidian') * 4, item('minecraft:gold_ingot'), item('minecraft:diamond'), 25)
Recipe Builder
Just like other recipe types, the Sawmill also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thermalexpansion.sawmill.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 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. (DefaultSawmillManager.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.SawmillManager$SawmillRecipe
).groovyregister()
Example
mods.thermalexpansion.sawmill.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:gold_ingot') * 2)
.register()
mods.thermalexpansion.sawmill.recipeBuilder()
.input(item('minecraft:clay') * 4)
.output(item('minecraft:gold_ingot'), item('minecraft:diamond'))
.chance(25)
.energy(1000)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.thermalexpansion.sawmill.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.thermalexpansion.sawmill.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.thermalexpansion.sawmill.removeAll()
Example
mods.thermalexpansion.sawmill.removeByInput(item('minecraft:pumpkin'))
mods.thermalexpansion.sawmill.removeByOutput(item('thermalfoundation:material:800'))
mods.thermalexpansion.sawmill.removeByOutput(item('minecraft:leather'))
mods.thermalexpansion.sawmill.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.sawmill.streamRecipes()