MobEffectUtil

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

Members

static formatDuration(instance as MobEffectInstance, durationFactor as float) as Component
script.zs
// MobEffectUtil.formatDuration(instance as MobEffectInstance, durationFactor as float) as Component;
MobEffectUtil.formatDuration(myMobEffectInstance, myFloat);

Parameters:

durationFactor Type: float

Return Type: Component

static getDigSpeedAmplification(entity as LivingEntity) as int
script.zs
// MobEffectUtil.getDigSpeedAmplification(entity as LivingEntity) as int;
MobEffectUtil.getDigSpeedAmplification(myLivingEntity);

Parameters:

entity Type: LivingEntity

Return Type: int

static hasDigSpeed(entity as LivingEntity) as bool
script.zs
// MobEffectUtil.hasDigSpeed(entity as LivingEntity) as bool;
MobEffectUtil.hasDigSpeed(myLivingEntity);

Parameters:

entity Type: LivingEntity

Return Type: bool

static hasWaterBreathing(entity as LivingEntity) as bool
script.zs
// MobEffectUtil.hasWaterBreathing(entity as LivingEntity) as bool;
MobEffectUtil.hasWaterBreathing(myLivingEntity);

Parameters:

entity Type: LivingEntity

Return Type: bool