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
ParameterTypeDescription
Parameter
data
Type
MapData
Description
No Description Provided

Name: applyEffect

Return Type: void

ZenScript
Copy
MobEffectInstance.applyEffect(entity as LivingEntity) as void
ParameterTypeDescription
Parameter
entity
Type
LivingEntity
Description
No Description Provided

Name: compareTo

Return Type: int

ZenScript
Copy
MobEffectInstance.compareTo(other as MobEffectInstance) as int
ParameterTypeDescription
Parameter
other
Type
MobEffectInstance
Description
No Description Provided

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: isNoCounter

Return Type: boolean

ZenScript
Copy
// MobEffectInstance.isNoCounter() as boolean

myMobEffectInstance.isNoCounter();

Name: isVisible

Return Type: boolean

ZenScript
Copy
// MobEffectInstance.isVisible() as boolean

myMobEffectInstance.isVisible();

Name: save

Return Type: MapData

ZenScript
Copy
MobEffectInstance.save(data as MapData) as MapData
ParameterTypeDescriptionOptionalDefaultValue
Parameter
data
Type
MapData
Description
No Description Provided
Optional
true
DefaultValue

Name: setNoCounter

Return Type: void

ZenScript
Copy
MobEffectInstance.setNoCounter(noCounter as boolean) as void
ParameterTypeDescription
Parameter
noCounter
Type
boolean
Description
No Description Provided

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
ParameterTypeDescriptionOptionalDefaultValue
Parameter
entity
Type
LivingEntity
Description
No Description Provided
Optional
false
DefaultValue
Parameter
onFinish
Type
Runnable
Description
No Description Provided
Optional
true
DefaultValue
() => {}

Name: update

Return Type: boolean

ZenScript
Copy
MobEffectInstance.update(instance as MobEffectInstance) as boolean
ParameterTypeDescription
Parameter
instance
Type
MobEffectInstance
Description
No Description Provided
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
descriptionId
Type
string
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
effect
Type
MobEffect
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
isNoCounter
Type
boolean
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
visible
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided