MobEffectInstance

Link to mobeffectinstance

Importing the class

Link to 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.

ZenScript
Copy
import crafttweaker.api.entity.effect.MobEffectInstance;

Implemented Interfaces

Link to implemented-interfaces

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

Name: load

Return Type: MobEffectInstance

ZenScript
Copy
MobEffectInstance.load(data as MapData) as MobEffectInstance
ParameterType
Parameter
data
Type
MapData

Name: of

Return Type: MobEffectInstance

ZenScript
Copy
MobEffectInstance.of(mobEffect as MobEffect, duration as int, amplifier as int, ambient as boolean, visible as boolean, showIcon as boolean, hiddenEffect as MobEffectInstance?) as MobEffectInstance
ParameterTypeOptionalDefault Value
Parameter
mobEffect
Type
MobEffect
Optional
false
Default Value
Parameter
duration
Type
int
Optional
true
Default Value
0
Parameter
amplifier
Type
int
Optional
true
Default Value
0
Parameter
ambient
Type
boolean
Optional
true
Default Value
false
Parameter
visible
Type
boolean
Optional
true
Default Value
true
Parameter
showIcon
Type
boolean
Optional
true
Default Value
true
Parameter
hiddenEffect
Type
MobEffectInstance?
Optional
true
Default Value

Name: compareTo

Return Type: int

ZenScript
Copy
MobEffectInstance.compareTo(other as MobEffectInstance) as int
ParameterType
Parameter
other
Type
MobEffectInstance

Name: getAmplifier

Return Type: int

ZenScript
Copy
// MobEffectInstance.getAmplifier() as int

myMobEffectInstance.getAmplifier();

Link to getDescriptionId

Name: getDescriptionId

Return Type: string

ZenScript
Copy
// MobEffectInstance.getDescriptionId() as string

myMobEffectInstance.getDescriptionId();

Name: getDuration

Return Type: int

ZenScript
Copy
// MobEffectInstance.getDuration() as int

myMobEffectInstance.getDuration();

Name: getEffect

Return Type: MobEffect

ZenScript
Copy
// MobEffectInstance.getEffect() as MobEffect

myMobEffectInstance.getEffect();

Name: isAmbient

Return Type: boolean

ZenScript
Copy
// MobEffectInstance.isAmbient() as boolean

myMobEffectInstance.isAmbient();

Name: isVisible

Return Type: boolean

ZenScript
Copy
// MobEffectInstance.isVisible() as boolean

myMobEffectInstance.isVisible();

Name: save

Return Type: MapData

ZenScript
Copy
// MobEffectInstance.save() as MapData

myMobEffectInstance.save();

Name: showIcon

Return Type: boolean

ZenScript
Copy
// MobEffectInstance.showIcon() as boolean

myMobEffectInstance.showIcon();

Name: tick

Return Type: boolean

ZenScript
Copy
MobEffectInstance.tick(entity as LivingEntity, onFinish as Runnable?) as boolean
ParameterTypeOptionalDefault Value
Parameter
entity
Type
LivingEntity
Optional
false
Default Value
Parameter
onFinish
Type
Runnable?
Optional
true
Default Value
null

Name: update

Return Type: boolean

ZenScript
Copy
MobEffectInstance.update(instance as MobEffectInstance) as boolean
ParameterType
Parameter
instance
Type
MobEffectInstance
NameTypeHas GetterHas Setter
Name
ambient
Type
boolean
Has Getter
true
Has Setter
false
Name
amplifier
Type
int
Has Getter
true
Has Setter
false
Name
descriptionId
Type
string
Has Getter
true
Has Setter
false
Name
duration
Type
int
Has Getter
true
Has Setter
false
Name
effect
Type
MobEffect
Has Getter
true
Has Setter
false
Name
showIcon
Type
boolean
Has Getter
true
Has Setter
false
Name
visible
Type
boolean
Has Getter
true
Has Setter
false