Brew Effect (Botania)
Description
Creates a custom brew, but not a recipe for the brew.
Identifier
Refer to this via any of the following:
mods.botania.brew/* Used as page default */
mods.botania.Brew
Adding Entries
Recipe Builder
Just like other recipe types, the Brew Effect also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.botania.brew.brewBuilder()
String
. Sets a unique key for the effect. Requires not null.groovykey(String)
String
. Sets the name of the effect.groovyname(String)
int
. Sets the base mana cost to make the brew. The Tainted Blood Pendant and Incense Stick recipes will cost 10 times as much mana. Requires greater than or equal to 1. (Default0
).groovycost(int) mana(int)
int
. Sets the color of effect. Requires not null. (Default0xFFFFFF
).groovycolor(int)
List<PotionEffect>
. Sets the potion effects, quantity, and duration of each when consuming the potion. Requires greater than or equal to 1.groovyeffect(PotionEffect) effect(PotionEffect...) effect(Collection<PotionEffect>)
boolean
. Sets if the brew can be infused on a Incense Stick, making it apply the effect persistently in a long-lasting AOE. (Defaulttrue
).groovyincense() incense(boolean)
boolean
. Sets if the custom brew can be infused on a Tainted Blood Pendant, making it a persistent effect at the cost of mana. (Defaulttrue
).groovybloodPendant() bloodPendant(boolean)
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
orvazkii.botania.api.brew.Brew
).groovyregister()
Example
mods.botania.brew.brewBuilder()
.key('groovy_example_brew')
.name('Groovy Brew')
.color(0x00FFFF)
.cost(100)
.effect(new PotionEffect(potion('minecraft:strength'), 1800, 3), new PotionEffect(potion('minecraft:speed'), 1800, 2), new PotionEffect(potion('minecraft:weakness'), 3600, 1))
.incense(true)
.bloodPendant(true)
.register()
Removing Entries
Removes the given brew matching the brew key:
groovymods.botania.brew.remove(String)
Removes all registered recipes:
groovymods.botania.brew.removeAll()
Example
mods.botania.brew.removeAll()
Getting the value of entries
Iterates through every brew in the brew registry, with the ability to call remove on any element to remove it:
groovymods.botania.brew.streamBrews()