Compost Bin (Pyrotech)
Description
Can convert multiple items into a new one when its full
Identifier
Refer to this via any of the following:
mods.pyrotech.compost_bin/* Used as page default */
mods.pyrotech.compostbin
mods.pyrotech.compostBin
mods.pyrotech.CompostBin
Adding Recipes
Adds recipes in the format
name
,input
,output
,compostValue
:groovymods.pyrotech.compost_bin.add(String, IIngredient, ItemStack, int)
Example
mods.pyrotech.compost_bin.add('iron_to_clay2', ore('ingotIron') * 5, item('minecraft:clay_ball') * 20, 2)
Recipe Builder
Just like other recipe types, the Compost Bin also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.pyrotech.compost_bin.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 how much the items fills the bin. Requires greater than or equal to 1. (Default0
).groovycompostValue(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
orcom.codetaylor.mc.pyrotech.modules.tech.basic.recipe.CompostBinRecipe
).groovyregister()
Example
mods.pyrotech.compost_bin.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:emerald') * 4)
.compostValue(25)
.name('diamond_to_emerald_compost_bin')
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.pyrotech.compost_bin.removeByInput(ItemStack)
Removes all recipes that match the given output:
groovymods.pyrotech.compost_bin.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.pyrotech.compost_bin.removeAll()
Example
mods.pyrotech.compost_bin.removeByInput(item('minecraft:golden_carrot'))
mods.pyrotech.compost_bin.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.compost_bin.streamRecipes()