Pit 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.pit_kiln/* Used as page default */
mods.pyrotech.pitkiln
mods.pyrotech.pitKiln
mods.pyrotech.PitKiln
mods.pyrotech.kiln
mods.pyrotech.Kiln
Adding Recipes
Adds recipes in the format
name
,input
,output
,burnTime
,failureChance
,failureOutput
:groovymods.pyrotech.pit_kiln.add(String, IIngredient, ItemStack, int, float, Iterable<ItemStack>)
Example
mods.pyrotech.pit_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 Pit Kiln also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.pyrotech.pit_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.pit_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.pit_kiln.removeByInput(ItemStack)
Removes all recipes that match the given output:
groovymods.pyrotech.pit_kiln.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.pyrotech.pit_kiln.removeAll()
Example
mods.pyrotech.pit_kiln.removeByOutput(item('pyrotech:bucket_clay'))
mods.pyrotech.pit_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.pit_kiln.streamRecipes()