Altar of Birthing (Nature's Aura)
Description
Converts multiple input itemstacks into a summoned entity, costing aura and taking time.
Warning
While more than 4 items can function as the input of a Altar of Birthing recipe, only the first 4 are shown in JEI.
Identifier
Refer to this via any of the following:
mods.naturesaura.spawning/* Used as page default */
mods.naturesaura.Spawning
Adding Recipes
Recipe Builder
Just like other recipe types, the Altar of Birthing also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.naturesaura.spawning.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to Integer.MAX_VALUE.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 aura the recipe drains from the environment. Requires greater than or equal to 1. (Default0
).groovyaura(int)
int
. Sets the time the recipe takes to complete. Requires greater than or equal to 1. (Default0
).groovytime(int)
ResourceLocation
. Sets the entity spawned. Requires not null.groovyentity(EntityEntry) entity(ResourceLocation)
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.AnimalSpawnerRecipe
).groovyregister()
Example
mods.naturesaura.spawning.recipeBuilder()
.name('demo')
.input(item('minecraft:clay'))
.entity(entity('minecraft:bat'))
.aura(100)
.time(100)
.register()
mods.naturesaura.spawning.recipeBuilder()
.name(resource('example:demo'))
.input(item('minecraft:mutton'))
.entity(entity('minecraft:wolf'))
.aura(30)
.time(5)
.register()
mods.naturesaura.spawning.recipeBuilder()
.input(item('minecraft:bone'), item('minecraft:dye:15') * 4)
.entity(resource('minecraft:skeleton'))
.aura(10)
.time(10)
.register()
Removing Recipes
Removes all Altar of Birthing recipes that summon the given entity:
groovymods.naturesaura.spawning.removeByEntity(EntityEntry)
Removes all Altar of Birthing recipes that summon the given entity:
groovymods.naturesaura.spawning.removeByEntity(ResourceLocation)
Removes all recipes that match the given input:
groovymods.naturesaura.spawning.removeByInput(IIngredient)
Removes the Altar of Birthing recipe with the given name:
groovymods.naturesaura.spawning.removeByName(ResourceLocation)
Removes all registered recipes:
groovymods.naturesaura.spawning.removeAll()
Example
mods.naturesaura.spawning.removeByEntity(entity('minecraft:polar_bear'))
mods.naturesaura.spawning.removeByEntity(resource('minecraft:cave_spider'))
mods.naturesaura.spawning.removeByInput(item('minecraft:bone'))
mods.naturesaura.spawning.removeByName(resource('naturesaura:cow'))
mods.naturesaura.spawning.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.spawning.streamRecipes()