Home Commands Examples Getting Started With Scripts Global Keywords
Generic JSON Recipes

Brew

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import mods.botania.Brew;

Methods

Checks whether this brew can be infused with a Blood Pendant.

Returns: True if it can be infused, false otherwise.
Return Type: boolean

script.zs
// Brew.canInfuseBloodPendant() as boolean
myBrew.canInfuseBloodPendant();

Checks whether this brew can be infused with incense.

Returns: True if it can be infused, false otherwise.
Return Type: boolean

script.zs
// Brew.canInfuseIncense() as boolean
myBrew.canInfuseIncense();

Gets the color of the brew for the ItemStack passed in.

Returns: The color of the brew for the given stack.
Return Type: int

script.zs
// Brew.getColor(stack as ItemStack) as int
myBrew.getColor(<item:minecraft:dirt>);
ParameterTypeDescription
Parameter
stack
Type
ItemStack
Description
The stack to get the color of.

Gets the command string of this brew.

Returns: The command string of this brew.
Return Type: string

script.zs
// Brew.getCommandString() as string
myBrew.getCommandString();

Gets the mana cost of the brew.

Returns: The mana cost of the brew.
Return Type: int

script.zs
// Brew.getManaCost() as int
myBrew.getManaCost();

Gets the mana cost of the brew for the ItemStack passed in.

Returns: The mana cost of the brew.
Return Type: int

script.zs
// Brew.getManaCost(stack as ItemStack) as int
myBrew.getManaCost(<item:minecraft:dirt>);
ParameterTypeDescription
Parameter
stack
Type
ItemStack
Description
The stack to get the mana cost of.

Gets the MobEffectInstances that this brew applies when consumed.

Returns: The MobEffectInstances that this brew applies when consumed.
Return Type: stdlib.List<MobEffectInstance>

script.zs
// Brew.getPotionEffects(stack as ItemStack) as stdlib.List<MobEffectInstance>
myBrew.getPotionEffects(<item:minecraft:dirt>);
ParameterTypeDescription
Parameter
stack
Type
ItemStack
Description
An ItemStack to provide extra context.

Gets the translation key of the brew.

Returns: The translation key of the brew.
Return Type: string

script.zs
// Brew.getTranslationKey() as string
myBrew.getTranslationKey();

Gets the translation key of the brew with extra context provided by the stack.

Returns: The translation key of the brew.
Return Type: string

script.zs
// Brew.getTranslationKey(stack as ItemStack) as string
myBrew.getTranslationKey(<item:minecraft:dirt>);
ParameterTypeDescription
Parameter
stack
Type
ItemStack
Description
The stack to provide extra context with.

Properties

NameTypeHas GetterHas SetterDescription
Name
canInfuseBloodPendant
Type
boolean
Has Getter
true
Has Setter
false
Description
Checks whether this brew can be infused with a Blood Pendant.
Name
canInfuseIncense
Type
boolean
Has Getter
true
Has Setter
false
Description
Checks whether this brew can be infused with incense.
Name
manaCost
Type
int
Has Getter
true
Has Setter
false
Description
Gets the mana cost of the brew.
Name
translationKey
Type
string
Has Getter
true
Has Setter
false
Description
Gets the translation key of the brew.