Compost (The Betweenlands)
Description
Converts an input itemstack into an amount of compost.
Identifier
Refer to this via any of the following:
mods.betweenlands.compost
mods.betweenlands.Compost
mods.thebetweenlands.compost/* Used as page default */
mods.thebetweenlands.Compost
Adding Recipes
Add the given recipe to the recipe list:
groovymods.thebetweenlands.compost.add(ICompostBinRecipe)
Recipe Builder
Just like other recipe types, the Compost also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thebetweenlands.compost.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
int
. Sets the time the recipe takes in ticks. Requires greater than or equal to 1. (Default0
).groovytime(int)
int
. Sets the amount of compost output. Requires greater than or equal to 1. (Default0
).groovyamount(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
orthebetweenlands.api.recipes.ICompostBinRecipe
).groovyregister()
Example
mods.thebetweenlands.compost.recipeBuilder()
.input(item('minecraft:clay'))
.amount(20)
.time(30)
.register()
mods.thebetweenlands.compost.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.amount(1)
.time(5)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.thebetweenlands.compost.remove(ICompostBinRecipe)
Removes all recipes that match the given input:
groovymods.thebetweenlands.compost.removeByInput(IIngredient)
Removes all registered recipes:
groovymods.thebetweenlands.compost.removeAll()
Example
mods.thebetweenlands.compost.removeByInput(item('thebetweenlands:items_misc:13'))
mods.thebetweenlands.compost.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.thebetweenlands.compost.streamRecipes()