Incense (Bewitchment)
Description
Converts up to 8 input ingredients in the Brazier when activated by a Flint and Steel for any number of potion effects that apply whenever a player wakes up nearby.
Identifier
Refer to this via any of the following:
mods.bewitchment.incense/* Used as page default */
mods.bewitchment.IncenseAdding Recipes
Adds the recipe:
groovymods.bewitchment.incense.add(Incense)
Recipe Builder
Just like other recipe types, the Incense also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovymods.bewitchment.incense.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 8.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)int. Sets the time the Brazier will remain active before being extinguished in seconds. Requires greater than or equal to 1. (Default0).groovytime(int)List<Potion>. Sets the potion effects provided upon waking up while the Incense is active. Requires greater than or equal to 1.groovypotion(Potion) potion(Potion...) potion(Collection<Potion>)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullorcom.bewitchment.api.registry.Incense).groovyregister()
Example
mods.bewitchment.incense.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:gold_ingot') * 5, item('minecraft:iron_ingot'))
.potion(potion('minecraft:strength'), potion('minecraft:resistance'))
.time(10000)
.register()Removing Recipes
Removes the recipe with the given Resource Location:
groovymods.bewitchment.incense.remove(ResourceLocation)Removes the recipe with the given String as its Resource Location:
groovymods.bewitchment.incense.remove(String)Removes the recipe:
groovymods.bewitchment.incense.remove(Incense)Removes all recipes that match the given input:
groovymods.bewitchment.incense.removeByInput(IIngredient)Removes all recipes providing the given potion effect:
groovymods.bewitchment.incense.removeByPotion(Potion)Removes all registered recipes:
groovymods.bewitchment.incense.removeAll()
Example
mods.bewitchment.incense.removeByInput(item('bewitchment:essence_of_vitality'))
mods.bewitchment.incense.removeByPotion(potion('minecraft:haste'))
mods.bewitchment.incense.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.bewitchment.incense.streamRecipes()
