Summon Creature (Roots 3)
Description
When running a Summon Creature Ritual, the input items placed on Catalyst Plate will summon the target entity.
Identifier
Refer to this via any of the following:
mods.roots.summon_creature/* Used as page default */
mods.roots.summoncreature
mods.roots.summonCreature
mods.roots.SummonCreature
Adding Recipes
Recipe Builder
Just like other recipe types, the Summon Creature also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.roots.summon_creature.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 10.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
Class<? extends EntityLivingBase>
. Sets the target entity. Requires not null.groovyentity(EntityEntry)
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
orepicsquid.roots.recipe.SummonCreatureRecipe
).groovyregister()
Example
mods.roots.summon_creature.recipeBuilder()
.name('wither_skeleton_from_clay')
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
.entity(entity('minecraft:wither_skeleton'))
.register()
Removing Recipes
Removes the Summon Creature recipe for the given Entity:
groovymods.roots.summon_creature.removeByEntity(Class<? extends EntityLivingBase>)
Removes the Summon Creature recipe for the given Entity:
groovymods.roots.summon_creature.removeByEntity(EntityEntry)
Removes the Summon Creature recipe with the given name:
groovymods.roots.summon_creature.removeByName(ResourceLocation)
Removes all registered recipes:
groovymods.roots.summon_creature.removeAll()
Example
mods.roots.summon_creature.removeByEntity(entity('minecraft:chicken'))
mods.roots.summon_creature.removeByName(resource('roots:cow'))
mods.roots.summon_creature.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.roots.summon_creature.streamRecipes()