Home Commands Examples Getting Started With Scripts Global Keywords 1.21 Migration Guide
Equipable IItemStack ItemCooldowns ItemDefinition ItemStack UseOnContext
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;

Implements

Undocumented Interfaces

FeatureElement

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>

static getName(prefix as string, potion as Potion = null) as string
script.zs
// Potion.getName(prefix as string, potion as Potion = null) as string;
Potion.getName(myString, myPotion);

Parameters:

prefix Type: string
potion (optional) Type: Potion

Default Value: null

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