MobEffect

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.

script.zs
import crafttweaker.api.entity.effect.MobEffect;

Implements

Undocumented Interfaces

IMobEffectExtension

Members

addAttributeModifier(attribute as Attribute, name as string, value as double, operation as Operation) as MobEffect
script.zs
// MobEffect.addAttributeModifier(attribute as Attribute, name as string, value as double, operation as Operation) as MobEffect;
myMobEffect.addAttributeModifier(myAttribute, myString, myDouble, myOperation);

Parameters:

attribute Type: Attribute
name Type: string
value Type: double

Return Type: MobEffect

applyEffectTick(entity as LivingEntity, amplifier as int)
script.zs
// MobEffect.applyEffectTick(entity as LivingEntity, amplifier as int);
myMobEffect.applyEffectTick(myLivingEntity, myInt);

Parameters:

entity Type: LivingEntity
amplifier Type: int
applyInstantenousEffect(source as Entity, indirectSource as Entity, target as LivingEntity, amplifier as int, effectiveness as double)
script.zs
// MobEffect.applyInstantenousEffect(source as Entity, indirectSource as Entity, target as LivingEntity, amplifier as int, effectiveness as double);
myMobEffect.applyInstantenousEffect(myEntity, myEntity, myLivingEntity, myInt, myDouble);

Parameters:

source Type: Entity
indirectSource Type: Entity
target Type: LivingEntity
amplifier Type: int
effectiveness Type: double
Getter
script.zs
// MobEffect.beneficial as bool
myMobEffect.beneficial

Return Type: bool

beneficial() as bool
script.zs
// MobEffect.beneficial() as bool;
myMobEffect.beneficial();

Return Type: bool

Getter
script.zs
// MobEffect.category as MobEffectCategory
myMobEffect.category

Return Type: MobEffectCategory

category() as MobEffectCategory
script.zs
// MobEffect.category() as MobEffectCategory;
myMobEffect.category();

Return Type: MobEffectCategory

Getter
script.zs
// MobEffect.color as int
myMobEffect.color

Return Type: int

color() as int
script.zs
// MobEffect.color() as int;
myMobEffect.color();

Return Type: int

Getter
script.zs
// MobEffect.commandString as string
myMobEffect.commandString

Return Type: string

Getter
script.zs
// MobEffect.descriptionId as string
myMobEffect.descriptionId

Return Type: string

descriptionId() as string
script.zs
// MobEffect.descriptionId() as string;
myMobEffect.descriptionId();

Return Type: string

Getter
script.zs
// MobEffect.displayName as Component
myMobEffect.displayName

Return Type: Component

displayName() as Component
script.zs
// MobEffect.displayName() as Component;
myMobEffect.displayName();

Return Type: Component

getAttributeModifiers() as AttributeModifierTemplate[Attribute]
script.zs
// MobEffect.getAttributeModifiers() as AttributeModifierTemplate[Attribute];
myMobEffect.getAttributeModifiers();

Return Type: AttributeModifierTemplate[Attribute]

Getter
script.zs
// MobEffect.instantenous as bool
myMobEffect.instantenous

Return Type: bool

instantenous() as bool
script.zs
// MobEffect.instantenous() as bool;
myMobEffect.instantenous();

Return Type: bool

Getter
script.zs
// MobEffect.registryName as ResourceLocation
myMobEffect.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// MobEffect.registryName() as ResourceLocation;
myMobEffect.registryName();

Return Type: ResourceLocation

shouldApplyEffectTickThisTick(duration as int, amplifier as int) as bool
script.zs
// MobEffect.shouldApplyEffectTickThisTick(duration as int, amplifier as int) as bool;
myMobEffect.shouldApplyEffectTickThisTick(myInt, myInt);

Parameters:

duration Type: int
amplifier Type: int

Return Type: bool