Sacrificial (Blood Magic: Alchemical Wizardry)
Description
How much Life Essence is gained when using the Sacrificial Dagger on a mob.
Identifier
Refer to this via any of the following:
mods.bm.sacrificial
mods.bm.Sacrificial
mods.bloodmagic.sacrificial/* Used as page default */
mods.bloodmagic.Sacrificial
Adding Recipes
Adds recipes in the format
entity
,value
:groovymods.bloodmagic.sacrificial.add(Entity, int)
Adds recipes in the format
entity
,value
:groovymods.bloodmagic.sacrificial.add(ResourceLocation, int)
Adds recipes in the format
entity
,value
:groovymods.bloodmagic.sacrificial.add(String, int)
Recipe Builder
Just like other recipe types, the Sacrificial also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.bloodmagic.sacrificial.recipeBuilder()
int
. Sets how much Life Essence the entity gives. Requires greater than or equal to 0. (Default0
).groovyvalue(int)
ResourceLocation
. Sets the target entity. Requires not null.groovyentity(Entity) entity(String) 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
ororg.apache.commons.lang3.tuple.Pair<net.minecraft.util.ResourceLocation, java.lang.Integer>
).groovyregister()
Example
mods.bloodmagic.sacrificial.recipeBuilder()
.entity('minecraft:enderman')
.value(1000)
.register()
Removing Recipes
Removes any Sacrificial values entry with the given Entity as a ResourceLocation:
groovymods.bloodmagic.sacrificial.remove(Entity)
Removes any Sacrificial values entry with the given EntityEntry as a ResourceLocation:
groovymods.bloodmagic.sacrificial.remove(EntityEntry)
Removes any Sacrificial values entry with the given ResourceLocation:
groovymods.bloodmagic.sacrificial.remove(ResourceLocation)
Removes any Sacrificial values entry with the given String as a ResourceLocation:
groovymods.bloodmagic.sacrificial.remove(String)
Removes all registered recipes:
groovymods.bloodmagic.sacrificial.removeAll()
Example
mods.bloodmagic.sacrificial.remove(entity('minecraft:villager'))
mods.bloodmagic.sacrificial.remove(resource('minecraft:villager'))
mods.bloodmagic.sacrificial.remove('minecraft:villager')
mods.bloodmagic.sacrificial.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.bloodmagic.sacrificial.streamRecipes()