MobEffect
Link to mobeffect
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 Copyimport crafttweaker.api.entity.effect.MobEffect;
Metodi
Link to metodi
Name: addAttributeModifier
Return Type: MobEffect
ZenScript CopyMobEffect.addAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation) as MobEffect
Parametro | Tipo |
---|---|
Parametro attribute | Tipo Attribute |
Parametro nome | Tipo string |
Parametro valore | Tipo double |
Parametro operation | Tipo AttributeOperation |
Name: applyEffectTick
ZenScript CopyMobEffect.applyEffectTick(entity as LivingEntity, amplifier as int)
Parametro | Tipo |
---|---|
Parametro entity | Tipo LivingEntity |
Parametro amplifier | Tipo int |
Name: applyInstantenousEffect
ZenScript CopyMobEffect.applyInstantenousEffect(source as Entity, indirectSource as Entity, target as LivingEntity, amplifier as int, effectiveness as double)
Parametro | Tipo |
---|---|
Parametro sorgente | Tipo Entity |
Parametro indirectSource | Tipo Entity |
Parametro target | Tipo LivingEntity |
Parametro amplifier | Tipo int |
Parametro effectiveness | Tipo double |
Name: getAttributeModifierValue
Return Type: double
ZenScript CopyMobEffect.getAttributeModifierValue(amplifier as int, modifier as AttributeModifier) as double
Parametro | Tipo |
---|---|
Parametro amplifier | Tipo int |
Parametro modifier | Tipo AttributeModifier |
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();
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();
Name: isDurationEffectTick
Return Type: boolean
ZenScript CopyMobEffect.isDurationEffectTick(duration as int, amplifier as int) as boolean
Parametro | Tipo |
---|---|
Parametro duration | Tipo int |
Parametro amplifier | Tipo int |
Name: isInstantenous
Return Type: boolean
ZenScript Copy// MobEffect.isInstantenous() as boolean
myMobEffect.isInstantenous();
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter |
---|---|---|---|
Nome beneficial | Tipo boolean | Ha Getter sì | Ha Setter no |
Nome category | Tipo MobEffectCategory | Ha Getter sì | Ha Setter no |
Nome color | Tipo int | Ha Getter sì | Ha Setter no |
Nome commandString | Tipo string | Ha Getter sì | Ha Setter no |
Nome descriptionId | Tipo string | Ha Getter sì | Ha Setter no |
Nome displayName | Tipo Component | Ha Getter sì | Ha Setter no |
Nome instantenous | Tipo boolean | Ha Getter sì | Ha Setter no |