Importing the class

Link to importing-the-class

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 g-

Name: addAttributeModifier

Return Type: MobEffect

ZenScript
Copy
MobEffect.addAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation) as MobEffect
ParameterTypeDescription
Parameter
attribute
Type
Attribute
Description
No Description Provided
Parameter
name
Type
string
Description
No Description Provided
Parameter
value
Type
double
Description
No Description Provided
Parameter
operation
Type
AttributeOperation
Description
No Description Provided

Link to g--1

Name: applyEffectTick

Return Type: void

ZenScript
Copy
MobEffect.applyEffectTick(entity as LivingEntity, amplifier as int) as void
ParameterTypeDescription
Parameter
entity
Type
LivingEntity
Description
No Description Provided
Parameter
amplifier
Type
int
Description
No Description Provided

Link to g--2

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
ParameterTypeDescription
Parameter
fuente
Type
Entity
Description
No Description Provided
Parameter
indirectSource
Type
Entity
Description
No Description Provided
Parameter
target
Type
LivingEntity
Description
No Description Provided
Parameter
amplifier
Type
int
Description
No Description Provided
Parameter
effectiveness
Type
double
Description
No Description Provided

Link to g--3

Name: getAttributeModifierValue

Return Type: double

ZenScript
Copy
MobEffect.getAttributeModifierValue(amplifier as int, modifier as AttributeModifier) as double
ParameterTypeDescription
Parameter
amplifier
Type
int
Description
No Description Provided
Parameter
modifier
Type
AttributeModifier
Description
No Description Provided

Link to g--4

Name: getAttributeModifiers

Return Type: AttributeModifier[Attribute]

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

myMobEffect.getAttributeModifiers();

Link to g--5

Name: getCategory

Return Type: MobEffectCategory

ZenScript
Copy
// MobEffect.getCategory() as MobEffectCategory

myMobEffect.getCategory();

Link to g--6

Name: getColor

Return Type: int

ZenScript
Copy
// MobEffect.getColor() as int

myMobEffect.getColor();

Link to g--7

Name: getDescriptionId

Return Type: string

ZenScript
Copy
// MobEffect.getDescriptionId() as string

myMobEffect.getDescriptionId();

Link to g--8

Name: getDisplayName

Return Type: Component

ZenScript
Copy
// MobEffect.getDisplayName() as Component

myMobEffect.getDisplayName();

Link to g--9

Name: isBeneficial

Return Type: boolean

ZenScript
Copy
// MobEffect.isBeneficial() as boolean

myMobEffect.isBeneficial();

Link to g--10

Name: isDurationEffectTick

Return Type: boolean

ZenScript
Copy
MobEffect.isDurationEffectTick(duration as int, amplifier as int) as boolean
ParameterTypeDescription
Parameter
duration
Type
int
Description
No Description Provided
Parameter
amplifier
Type
int
Description
No Description Provided

Link to g--11

Name: isInstantenous

Return Type: boolean

ZenScript
Copy
// MobEffect.isInstantenous() as boolean

myMobEffect.isInstantenous();
NombreTypeHas GetterHas SetterDescription
Nombre
beneficial
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided
Nombre
category
Type
MobEffectCategory
Has Getter
true
Has Setter
false
Description
No Description Provided
Nombre
color
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Nombre
commandString
Type
string
Has Getter
true
Has Setter
false
Description
No Description Provided
Nombre
descriptionId
Type
string
Has Getter
true
Has Setter
false
Description
No Description Provided
Nombre
displayName
Type
Component
Has Getter
true
Has Setter
false
Description
No Description Provided
Nombre
instantenous
Type
boolean
Has Getter
true
Has Setter
false
Description
No Description Provided