MobEffectInstance

Link to mobeffectinstance

Importare la Classe

Link to importare-la-classe

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;

Interfacce Implementate

Link to interfacce-implementate

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
ParametroTipo
Parametro
data
Tipo
MapData
ZenScript
Copy
new MobEffectInstance(mobEffect as MobEffect) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>);
ParametroTipo
Parametro
mobEffect
Tipo
MobEffect
ZenScript
Copy
new MobEffectInstance(mobEffect as MobEffect, duration as int) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100);
ParametroTipo
Parametro
mobEffect
Tipo
MobEffect
Parametro
duration
Tipo
int
ZenScript
Copy
new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2);
ParametroTipo
Parametro
mobEffect
Tipo
MobEffect
Parametro
duration
Tipo
int
Parametro
amplifier
Tipo
int
ZenScript
Copy
new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as boolean, visible as boolean) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2, true, false);
ParametroTipo
Parametro
mobEffect
Tipo
MobEffect
Parametro
duration
Tipo
int
Parametro
amplifier
Tipo
int
Parametro
ambient
Tipo
boolean
Parametro
visible
Tipo
boolean
ZenScript
Copy
new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as boolean, visible as boolean, showIcon as boolean) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2, true, false, false);
ParametroTipo
Parametro
mobEffect
Tipo
MobEffect
Parametro
duration
Tipo
int
Parametro
amplifier
Tipo
int
Parametro
ambient
Tipo
boolean
Parametro
visible
Tipo
boolean
Parametro
showIcon
Tipo
boolean
ZenScript
Copy
new MobEffectInstance(mobEffect as MobEffect, duration as int, amplifier as int, ambient as boolean, visible as boolean, showIcon as boolean, hiddenEffect as MobEffectInstance) as MobEffectInstance
new MobEffectInstance(<mobeffect:minecraft:haste>, 100, 2, true, false, false, new MobEffectInstance(<mobeffect:minecraft:haste>, 200, 3));
ParametroTipo
Parametro
mobEffect
Tipo
MobEffect
Parametro
duration
Tipo
int
Parametro
amplifier
Tipo
int
Parametro
ambient
Tipo
boolean
Parametro
visible
Tipo
boolean
Parametro
showIcon
Tipo
boolean
Parametro
hiddenEffect
Tipo
MobEffectInstance

Name: applyEffect

ZenScript
Copy
MobEffectInstance.applyEffect(entity as LivingEntity)
ParametroTipo
Parametro
entity
Tipo
LivingEntity

Name: compareTo

Return Type: int

ZenScript
Copy
MobEffectInstance.compareTo(other as MobEffectInstance) as int
ParametroTipo
Parametro
other
Tipo
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: 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
ParametroTipoOptional
Parametro
data
Tipo
MapData?
Optional

Name: setNoCounter

ZenScript
Copy
MobEffectInstance.setNoCounter(noCounter as boolean)
ParametroTipo
Parametro
noCounter
Tipo
boolean

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
ParametroTipoOptionalDefault Value
Parametro
entity
Tipo
LivingEntity
Optional
no
Default Value
Parametro
onFinish
Tipo
Runnable?
Optional
Default Value
null

Name: update

Return Type: boolean

ZenScript
Copy
MobEffectInstance.update(instance as MobEffectInstance) as boolean
ParametroTipo
Parametro
instance
Tipo
MobEffectInstance
NomeTipoHa GetterHa Setter
Nome
ambient
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
amplifier
Tipo
int
Ha Getter
Ha Setter
no
Nome
descriptionId
Tipo
string
Ha Getter
Ha Setter
no
Nome
duration
Tipo
int
Ha Getter
Ha Setter
no
Nome
effect
Tipo
MobEffect
Ha Getter
Ha Setter
no
Nome
isNoCounter
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
showIcon
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
visible
Tipo
boolean
Ha Getter
Ha Setter
no