Home Migration Guide Getting Started With Scripts Commands Examples
BracketHandlers

MCPotionEffectInstance

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 crafttweaker.api.potion.MCPotionEffectInstance;

Implemented Interfaces

MCPotionEffectInstance implements the following interfaces. That means all methods defined in these interfaces are also available in MCPotionEffectInstance

Methods

Return Type: void

script.zs
MCPotionEffectInstance.addCurativeItem(stack as IItemStack) as void
ParameterTypeDescription
Parameter
stack
Type
IItemStack
Description
No Description Provided

Return Type: boolean

script.zs
MCPotionEffectInstance.combine(effect as MCPotionEffectInstance) as boolean
ParameterTypeDescription
Parameter
effect
Type
MCPotionEffectInstance
Description
No Description Provided

Return Type: stdlib.List<IItemStack>

script.zs
// MCPotionEffectInstance.getCurativeItems() as stdlib.List<IItemStack>
myMCPotionEffectInstance.getCurativeItems();

Return Type: boolean

script.zs
MCPotionEffectInstance.isCurativeItem(stack as IItemStack) as boolean
ParameterTypeDescription
Parameter
stack
Type
IItemStack
Description
No Description Provided

Return Type: void

script.zs
MCPotionEffectInstance.setCurativeItems(items as IItemStack[]) as void
ParameterTypeDescription
Parameter
items
Type
IItemStack[]
Description
No Description Provided

Properties

NameTypeHas GetterHas SetterDescription
Name
ambient
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
amplifier
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
duration
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
effectName
Type
string
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
potion
Type
MCPotionEffect
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
showIcon
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
showParticles
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided