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.MobEffect;

Link to addAttributeModifier

Name: addAttributeModifier

Return Type: MobEffect

ZenScript
Copy
MobEffect.addAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation) as MobEffect
ParametroTipoDescrizione
Parametro
attribute
Tipo
Attribute
Descrizione
No Description Provided
Parametro
nome
Tipo
string
Descrizione
No Description Provided
Parametro
valore
Tipo
double
Descrizione
No Description Provided
Parametro
operation
Tipo
AttributeOperation
Descrizione
No Description Provided

Name: applyEffectTick

Return Type: void

ZenScript
Copy
MobEffect.applyEffectTick(entity as LivingEntity, amplifier as int) as void
ParametroTipoDescrizione
Parametro
entity
Tipo
LivingEntity
Descrizione
No Description Provided
Parametro
amplifier
Tipo
int
Descrizione
No Description Provided

Link to applyInstantenousEffect

Name: applyInstantenousEffect

Return Type: void

ZenScript
Copy
MobEffect.applyInstantenousEffect(source as Entity, indirectSource as Entity, target as LivingEntity, amplifier as int, effectiveness as double) as void
ParametroTipoDescrizione
Parametro
sorgente
Tipo
Entity
Descrizione
No Description Provided
Parametro
indirectSource
Tipo
Entity
Descrizione
No Description Provided
Parametro
target
Tipo
LivingEntity
Descrizione
No Description Provided
Parametro
amplifier
Tipo
int
Descrizione
No Description Provided
Parametro
effectiveness
Tipo
double
Descrizione
No Description Provided

Link to getAttributeModifierValue

Name: getAttributeModifierValue

Return Type: double

ZenScript
Copy
MobEffect.getAttributeModifierValue(amplifier as int, modifier as AttributeModifier) as double
ParametroTipoDescrizione
Parametro
amplifier
Tipo
int
Descrizione
No Description Provided
Parametro
modifier
Tipo
AttributeModifier
Descrizione
No Description Provided

Link to getAttributeModifiers

Name: getAttributeModifiers

Return Type: AttributeModifier[Attribute]

ZenScript
Copy
// MobEffect.getAttributeModifiers() as AttributeModifier[Attribute]

myMobEffect.getAttributeModifiers();

Name: getCategory

Return Type: MobEffectCategory

ZenScript
Copy
// MobEffect.getCategory() as MobEffectCategory

myMobEffect.getCategory();

Name: getColor

Return Type: int

ZenScript
Copy
// MobEffect.getColor() as int

myMobEffect.getColor();

Link to getDescriptionId

Name: getDescriptionId

Return Type: string

ZenScript
Copy
// MobEffect.getDescriptionId() as string

myMobEffect.getDescriptionId();

Name: getDisplayName

Return Type: Component

ZenScript
Copy
// MobEffect.getDisplayName() as Component

myMobEffect.getDisplayName();

Name: isBeneficial

Return Type: boolean

ZenScript
Copy
// MobEffect.isBeneficial() as boolean

myMobEffect.isBeneficial();

Link to isDurationEffectTick

Name: isDurationEffectTick

Return Type: boolean

ZenScript
Copy
MobEffect.isDurationEffectTick(duration as int, amplifier as int) as boolean
ParametroTipoDescrizione
Parametro
duration
Tipo
int
Descrizione
No Description Provided
Parametro
amplifier
Tipo
int
Descrizione
No Description Provided

Name: isInstantenous

Return Type: boolean

ZenScript
Copy
// MobEffect.isInstantenous() as boolean

myMobEffect.isInstantenous();
NomeTipoHa GetterHa SetterDescrizione
Nome
beneficial
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
category
Tipo
MobEffectCategory
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
color
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
commandString
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
descriptionId
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
displayName
Tipo
Component
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
instantenous
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided