Compost (Actually Additions)
Description
Converts an input item into an output item after 150 seconds. Requires an input and output display blockstate.
Identifier
Refer to this via any of the following:
mods.aa.compost
mods.aa.Compost
mods.actuallyadditions.compost/* Used as page default */
mods.actuallyadditions.Compost
Adding Recipes
Add the given recipe to the recipe list:
groovymods.actuallyadditions.compost.add(CompostRecipe)
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.actuallyadditions.compost.recipeBuilder()
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>)
IBlockState
. Sets the texture rendering inside the Compost Bin in-world while the given recipe is being processed. Requires not null.groovyinputDisplay(IBlockState)
IBlockState
. Sets the texture rendering inside the Compost Bin in-world while the given recipe has been completed but has not yet been extracted. Requires not null.groovyoutputDisplay(IBlockState)
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
orde.ellpeck.actuallyadditions.api.recipe.CompostRecipe
).groovyregister()
Example
mods.actuallyadditions.compost.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.inputDisplay(blockstate('minecraft:clay'))
.outputDisplay(blockstate('minecraft:diamond_block'))
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.actuallyadditions.compost.remove(CompostRecipe)
Removes all recipes that match the given input:
groovymods.actuallyadditions.compost.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.actuallyadditions.compost.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.actuallyadditions.compost.removeAll()
Example
mods.actuallyadditions.compost.removeByInput(item('actuallyadditions:item_canola_seed'))
mods.actuallyadditions.compost.removeByOutput(item('actuallyadditions:item_fertilizer'))
mods.actuallyadditions.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.actuallyadditions.compost.streamRecipes()