MobEffectUtil

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.

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

Static Methods

Return Type: Component

script.zs
MobEffectUtil.formatDuration(instance as MobEffectInstance, durationFactor as float) as Component
ParameterType
Parameter
instance
Type
MobEffectInstance
Parameter
durationFactor
Type
float

Return Type: int

script.zs
MobEffectUtil.getDigSpeedAmplification(entity as LivingEntity) as int
ParameterType
Parameter
entity
Type
LivingEntity

Return Type: boolean

script.zs
MobEffectUtil.hasDigSpeed(entity as LivingEntity) as boolean
ParameterType
Parameter
entity
Type
LivingEntity

Return Type: boolean

script.zs
MobEffectUtil.hasWaterBreathing(entity as LivingEntity) as boolean
ParameterType
Parameter
entity
Type
LivingEntity