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.
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
// MobEffect.addAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation) as MobEffect;myMobEffect.addAttributeModifier(myAttribute, myString, myDouble, myOperation);
Parameters:
name: string
Type: string
value: double
Type: double
operation: AttributeOperation
Type: AttributeOperation
Return Type:
MobEffect
applyEffectTick(entity as LivingEntity, amplifier as int)
myMobEffect.applyEffectTick(myLivingEntity, myInt);
Parameters:
entity: LivingEntity
Type: LivingEntity
amplifier: int
Type: int
applyInstantenousEffect(source as Entity, indirectSource as Entity, target as LivingEntity, amplifier as int, effectiveness as double)
// 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:
Getter
// MobEffect.beneficial as boolmyMobEffect.beneficial
Return Type:
bool
beneficial() as bool
// MobEffect.beneficial() as bool;myMobEffect.beneficial();
Return Type:
bool
Getter
// MobEffect.category as MobEffectCategorymyMobEffect.category
Return Type:
MobEffectCategory
category() as MobEffectCategory
Getter
// MobEffect.color as intmyMobEffect.color
Return Type:
int
color() as int
// MobEffect.color() as int;myMobEffect.color();
Return Type:
int
Getter
// MobEffect.commandString as stringmyMobEffect.commandString
Return Type:
string
Getter
// MobEffect.descriptionId as stringmyMobEffect.descriptionId
Return Type:
string
descriptionId() as string
// MobEffect.descriptionId() as string;myMobEffect.descriptionId();
Return Type:
string
getAttributeModifiers() as AttributeModifierTemplate[Attribute]
Getter
// MobEffect.instantenous as boolmyMobEffect.instantenous
Return Type:
bool
instantenous() as bool
// MobEffect.instantenous() as bool;myMobEffect.instantenous();
Return Type:
bool
Getter
// MobEffect.registryName as ResourceLocationmyMobEffect.registryName
Return Type:
ResourceLocation
registryName() as ResourceLocation
shouldApplyEffectTickThisTick(duration as int, amplifier as int) as bool
// MobEffect.shouldApplyEffectTickThisTick(duration as int, amplifier as int) as bool;myMobEffect.shouldApplyEffectTickThisTick(myInt, myInt);
Parameters:
duration: int
Type: int
amplifier: int
Type: int
Return Type:
bool