Ritual of the Forest (Nature's Aura)
Description
Converts multiple input items into an output itemstack after a duration when a sapling grows in the middle of a multiblock structure.
Warning
The sapling used must extended BlockSapling
for the recipe to function properly.
Identifier
Refer to this via any of the following:
mods.naturesaura.ritual/* Used as page default */
mods.naturesaura.Ritual
Adding Recipes
Recipe Builder
Just like other recipe types, the Ritual of the Forest also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.naturesaura.ritual.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 8.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 the recipe takes to complete. Requires greater than or equal to 1. (Default0
).groovytime(int)
IIngredient
. Sets the sapling used. Requires not null.groovysapling(IIngredient)
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.naturesaura.api.recipes.TreeRitualRecipe
).groovyregister()
Example
mods.naturesaura.ritual.recipeBuilder()
.name('demo')
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.time(100)
.sapling(item('minecraft:sapling:1'))
.register()
mods.naturesaura.ritual.recipeBuilder()
.name(resource('example:demo'))
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
.output(item('minecraft:gold_ingot'))
.time(15)
.sapling(item('minecraft:sapling:1'))
.register()
mods.naturesaura.ritual.recipeBuilder()
.input(item('minecraft:gold_ingot'), item('minecraft:clay'), item('minecraft:gold_ingot'), item('minecraft:clay'), item('minecraft:gold_ingot'), item('minecraft:clay'), item('minecraft:gold_ingot'), item('minecraft:clay'))
.output(item('minecraft:diamond') * 16)
.time(20)
.sapling(item('minecraft:sapling:3'))
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.naturesaura.ritual.removeByInput(IIngredient)
Removes the Ritual of the Forest recipe with the given name:
groovymods.naturesaura.ritual.removeByName(ResourceLocation)
Removes all recipes that match the given output:
groovymods.naturesaura.ritual.removeByOutput(IIngredient)
Removes all Rituals of the Forest using the given sapling:
groovymods.naturesaura.ritual.removeBySapling(IIngredient)
Removes all registered recipes:
groovymods.naturesaura.ritual.removeAll()
Example
mods.naturesaura.ritual.removeByInput(item('naturesaura:infused_stone'))
mods.naturesaura.ritual.removeByName(resource('naturesaura:eye_improved'))
mods.naturesaura.ritual.removeByOutput(item('naturesaura:eye'))
mods.naturesaura.ritual.removeBySapling(item('minecraft:sapling:3'))
mods.naturesaura.ritual.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.naturesaura.ritual.streamRecipes()