MobEffectInstance

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.entity.effect.MobEffectInstance;

Implements

Undocumented Interfaces

Comparable<MobEffectInstance>,IMobEffectInstanceExtension

Constructors

new(mobEffect as MobEffect)
script.zs
// new MobEffectInstance(mobEffect as MobEffect);
new MobEffectInstance(myMobEffect);

Parameters:

mobEffect Type: MobEffect
new(mobEffect as MobEffect, duration as int)
script.zs
// new MobEffectInstance(mobEffect as MobEffect, duration as int);
new MobEffectInstance(myMobEffect, myInt);

Parameters:

mobEffect Type: MobEffect
duration Type: int
new(mobEffect as MobEffect, duration as int, amplifier as int)
script.zs
// new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int);
new MobEffectInstance(myMobEffect, myInt, myInt);

Parameters:

mobEffect Type: MobEffect
duration Type: int
amplifier Type: int
new(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool)
script.zs
// new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool);
new MobEffectInstance(myMobEffect, myInt, myInt, myBool, myBool);

Parameters:

mobEffect Type: MobEffect
duration Type: int
amplifier Type: int
ambient Type: bool
visible Type: bool
new(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool, showIcon as bool)
script.zs
// new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool, showIcon as bool);
new MobEffectInstance(myMobEffect, myInt, myInt, myBool, myBool, myBool);

Parameters:

mobEffect Type: MobEffect
duration Type: int
amplifier Type: int
ambient Type: bool
visible Type: bool
showIcon Type: bool
new(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool, showIcon as bool, hiddenEffect as MobEffectInstance)
script.zs
// new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool, showIcon as bool, hiddenEffect as MobEffectInstance);
new MobEffectInstance(myMobEffect, myInt, myInt, myBool, myBool, myBool, myMobEffectInstance);

Parameters:

mobEffect Type: MobEffect
duration Type: int
amplifier Type: int
ambient Type: bool
visible Type: bool
showIcon Type: bool
hiddenEffect Type: MobEffectInstance

Members

Getter
script.zs
// MobEffectInstance.ambient as bool
myMobEffectInstance.ambient

Return Type: bool

ambient() as bool
script.zs
// MobEffectInstance.ambient() as bool;
myMobEffectInstance.ambient();

Return Type: bool

Getter
script.zs
// MobEffectInstance.amplifier as int
myMobEffectInstance.amplifier

Return Type: int

amplifier() as int
script.zs
// MobEffectInstance.amplifier() as int;
myMobEffectInstance.amplifier();

Return Type: int

compareTo(other as MobEffectInstance) as int
script.zs
// MobEffectInstance.compareTo(other as MobEffectInstance) as int;
myMobEffectInstance.compareTo(myMobEffectInstance);

Parameters:

Return Type: int

Getter
script.zs
// MobEffectInstance.descriptionId as string
myMobEffectInstance.descriptionId

Return Type: string

descriptionId() as string
script.zs
// MobEffectInstance.descriptionId() as string;
myMobEffectInstance.descriptionId();

Return Type: string

Getter
script.zs
// MobEffectInstance.duration as int
myMobEffectInstance.duration

Return Type: int

duration() as int
script.zs
// MobEffectInstance.duration() as int;
myMobEffectInstance.duration();

Return Type: int

Getter
script.zs
// MobEffectInstance.effect as MobEffect
myMobEffectInstance.effect

Return Type: MobEffect

effect() as MobEffect
script.zs
// MobEffectInstance.effect() as MobEffect;
myMobEffectInstance.effect();

Return Type: MobEffect

static load(data as MapData) as MobEffectInstance
script.zs
// MobEffectInstance.load(data as MapData) as MobEffectInstance;
MobEffectInstance.load(myMapData);

Parameters:

data Type: MapData

Return Type: MobEffectInstance

save(data as MapData = null) as MapData
script.zs
// MobEffectInstance.save(data as MapData = null) as MapData;
myMobEffectInstance.save(myMapData);

Parameters:

data (optional) Type: MapData

Default Value: null

Return Type: MapData

Getter
script.zs
// MobEffectInstance.showIcon as bool
myMobEffectInstance.showIcon

Return Type: bool

showIcon() as bool
script.zs
// MobEffectInstance.showIcon() as bool;
myMobEffectInstance.showIcon();

Return Type: bool

tick(entity as LivingEntity, onFinish as Runnable = null) as bool
script.zs
// MobEffectInstance.tick(entity as LivingEntity, onFinish as Runnable = null) as bool;
myMobEffectInstance.tick(myLivingEntity, myRunnable);

Parameters:

entity Type: LivingEntity
onFinish (optional) Type: Runnable

Default Value: null

Return Type: bool

update(instance as MobEffectInstance) as bool
script.zs
// MobEffectInstance.update(instance as MobEffectInstance) as bool;
myMobEffectInstance.update(myMobEffectInstance);

Parameters:

Return Type: bool

Getter
script.zs
// MobEffectInstance.visible as bool
myMobEffectInstance.visible

Return Type: bool

visible() as bool
script.zs
// MobEffectInstance.visible() as bool;
myMobEffectInstance.visible();

Return Type: bool