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.
import crafttweaker.api.entity.effect.MobEffectInstance;
Implements
Undocumented Interfaces
Comparable<MobEffectInstance>
,IForgeMobEffectInstance
Constructors
new(mobEffect as MobEffect)
new(mobEffect as MobEffect, duration as int)
new(mobEffect as MobEffect, duration as int, amplifier as int)
new(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool)
// new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool);new MobEffectInstance(myMobEffect, myInt, myInt, myBool, myBool);
new(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool, showIcon as bool)
// 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);
new(mobEffect as MobEffect, duration as int, amplifier as int, ambient as bool, visible as bool, showIcon as bool, hiddenEffect as MobEffectInstance)
// 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:
duration: int
Type: int
amplifier: int
Type: int
ambient: bool
Type: bool
visible: bool
Type: bool
showIcon: bool
Type: bool
hiddenEffect: MobEffectInstance
Type: MobEffectInstance
Members
Getter
// MobEffectInstance.ambient as boolmyMobEffectInstance.ambient
Return Type:
bool
ambient() as bool
// MobEffectInstance.ambient() as bool;myMobEffectInstance.ambient();
Return Type:
bool
Getter
// MobEffectInstance.amplifier as intmyMobEffectInstance.amplifier
Return Type:
int
amplifier() as int
// MobEffectInstance.amplifier() as int;myMobEffectInstance.amplifier();
Return Type:
int
applyEffect(entity as LivingEntity)
// MobEffectInstance.applyEffect(entity as LivingEntity);myMobEffectInstance.applyEffect(myLivingEntity);
Parameters:
entity: LivingEntity
Type: LivingEntity
compareTo(other as MobEffectInstance) as int
// MobEffectInstance.compareTo(other as MobEffectInstance) as int;myMobEffectInstance.compareTo(myMobEffectInstance);
Parameters:
other: MobEffectInstance
Type: MobEffectInstance
Return Type:
int
Getter
// MobEffectInstance.descriptionId as stringmyMobEffectInstance.descriptionId
Return Type:
string
descriptionId() as string
// MobEffectInstance.descriptionId() as string;myMobEffectInstance.descriptionId();
Return Type:
string
Getter
// MobEffectInstance.duration as intmyMobEffectInstance.duration
Return Type:
int
duration() as int
// MobEffectInstance.duration() as int;myMobEffectInstance.duration();
Return Type:
int
static load(data as MapData) as MobEffectInstance
// MobEffectInstance.load(data as MapData) as MobEffectInstance;MobEffectInstance.load(myMapData);
Return Type:
MobEffectInstance
Getter
// MobEffectInstance.showIcon as boolmyMobEffectInstance.showIcon
Return Type:
bool
showIcon() as bool
// MobEffectInstance.showIcon() as bool;myMobEffectInstance.showIcon();
Return Type:
bool
tick(entity as LivingEntity, onFinish as Runnable = null) as bool
// MobEffectInstance.tick(entity as LivingEntity, onFinish as Runnable = null) as bool;myMobEffectInstance.tick(myLivingEntity, myRunnable);
Parameters:
entity: LivingEntity
Type: LivingEntity
onFinish: Runnable
(optional) Type: Runnable
Default Value: null
Return Type:
bool
update(instance as MobEffectInstance) as bool
// MobEffectInstance.update(instance as MobEffectInstance) as bool;myMobEffectInstance.update(myMobEffectInstance);
Parameters:
instance: MobEffectInstance
Type: MobEffectInstance
Return Type:
bool
Getter
// MobEffectInstance.visible as boolmyMobEffectInstance.visible
Return Type:
bool
visible() as bool
// MobEffectInstance.visible() as bool;myMobEffectInstance.visible();
Return Type:
bool