Composter (Future MC)
Description
Converts input items into a chance to get a layer of compost, with 8 layers providing a single bonemeal.
Identifier
Refer to this via any of the following:
mods.futuremc.composter/* Used as page default */
mods.futuremc.Composter
Adding Entries
Adds entries in the format
ingredient
,chance
:groovymods.futuremc.composter.add(IIngredient, byte)
Adds entries in the format
ingredient
,chance
:groovymods.futuremc.composter.add(Ingredient, byte)
Recipe Builder
Just like other recipe types, the Composter also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovymods.futuremc.composter.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
int
. Sets the chance the recipe has to provide a layer of compost. Requires greater than or equal to 0 and less than or equal to 100. (Default0
).groovychance(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
ororg.apache.commons.lang3.tuple.Pair<net.minecraft.item.crafting.Ingredient, java.lang.Byte>
).groovyregister()
Example
mods.futuremc.composter.recipeBuilder()
.input(item('minecraft:clay'))
.chance(100)
.register()
mods.futuremc.composter.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.chance(30)
.register()
Removing Entries
Removes an entry with the same Ingredient:
groovymods.futuremc.composter.remove(IIngredient)
Removes an entry with the same Ingredient:
groovymods.futuremc.composter.remove(Ingredient)
Removes all recipes that match the given input:
groovymods.futuremc.composter.removeByInput(IIngredient)
Removes all registered recipes:
groovymods.futuremc.composter.removeAll()
Example
mods.futuremc.composter.removeByInput(item('minecraft:cactus'))
mods.futuremc.composter.removeAll()
Getting the value of entries
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.futuremc.composter.streamRecipes()