Kiln (Pyrotech)
Description
Converts an item into a new one by burning it. Has a chance to fail.
Identifier
Refer to this via any of the following:
mods.pyrotech.kiln/* Used as page default */
mods.pyrotech.Kiln
Adding Recipes
Adds recipes in the format
name
,input
,output
,burnTime
,failureChance
,failureOutput
:groovymods.pyrotech.kiln.add(String, IIngredient, ItemStack, int, float, Iterable<ItemStack>)
Example
mods.pyrotech.kiln.add('clay_to_iron', item('minecraft:clay_ball') * 5, item('minecraft:iron_ingot'), 1200, 0.5f, [item('minecraft:dirt'), item('minecraft:cobblestone')])
Recipe Builder
Just like other recipe types, the Kiln also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.pyrotech.kiln.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
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 exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
int
. Sets the time required for the recipe to complete. Requires greater than or equal to 1. (Default0
).groovyburnTime(int)
float
. Sets the chance to fail the recipe. Requires greater than or equal to 0. (Default0.0f
).groovyfailureChance(float)
ItemStackList
. Sets the output when the recipe failed.groovyfailureOutput(ItemStack) failureOutput(ItemStack...) failureOutput(Iterable<ItemStack>)
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
orcom.codetaylor.mc.pyrotech.modules.tech.basic.recipe.KilnPitRecipe
).groovyregister()
Example
mods.pyrotech.kiln.recipeBuilder()
.input(item('minecraft:iron_ingot'))
.output(item('minecraft:gold_ingot'))
.burnTime(400)
.failureChance(1f)
.failureOutput(item('minecraft:wheat'), item('minecraft:carrot'), item('minecraft:sponge'))
.name('iron_to_gold_kiln_with_failure_items')
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.pyrotech.kiln.removeByInput(ItemStack)
Removes all recipes that match the given output:
groovymods.pyrotech.kiln.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.pyrotech.kiln.removeAll()
Example
mods.pyrotech.kiln.removeByOutput(item('pyrotech:bucket_clay'))
mods.pyrotech.kiln.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.pyrotech.kiln.streamRecipes()