Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Potion

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.item.alchemy.Potion;

Members

Getter
script.zs
// Potion.commandString as string
myPotion.commandString

Return Type: string

Getter
script.zs
// Potion.effects as List<MobEffectInstance>
myPotion.effects

Return Type: List<MobEffectInstance>

effects() as List<MobEffectInstance>
script.zs
// Potion.effects() as List<MobEffectInstance>;
myPotion.effects();

Return Type: List<MobEffectInstance>

getName(prefix as string) as string
script.zs
// Potion.getName(prefix as string) as string;
myPotion.getName(myString);

Parameters:

prefix Type: string

Return Type: string

Getter
script.zs
// Potion.hasInstantEffects as bool
myPotion.hasInstantEffects

Return Type: bool

hasInstantEffects() as bool
script.zs
// Potion.hasInstantEffects() as bool;
myPotion.hasInstantEffects();

Return Type: bool

Getter
script.zs
// Potion.registryName as ResourceLocation
myPotion.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// Potion.registryName() as ResourceLocation;
myPotion.registryName();

Return Type: ResourceLocation