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.
import crafttweaker.api.entity.effect.MobEffectUtil;Members
static formatDuration(instance as MobEffectInstance, durationFactor as float, ticksPerSecond as float) as Component
Formats the duration of a script.zs
MobEffectInstance.Returns: The formatted duration.
// MobEffectUtil.formatDuration(instance as MobEffectInstance, durationFactor as float, ticksPerSecond as float) as Component;MobEffectUtil.formatDuration(myMobEffectInstance, myFloat, myFloat);Parameters:
instance: MobEffectInstance Type: MobEffectInstance durationFactor: float Type: float
- The factor to multiply the duration by. ticksPerSecond: float Type: float
- The number of ticks per second.
Return Type:
Component
static getDigSpeedAmplification(entity as LivingEntity) as int
Gets the dig speed amplification of the script.zs
LivingEntity.Returns: The dig speed amplification of the LivingEntity.
MobEffectUtil.getDigSpeedAmplification(myLivingEntity);Parameters:
Return Type:
int
static hasDigSpeed(entity as LivingEntity) as bool
Checks if the script.zs
LivingEntity has dig speed.Returns: True if the LivingEntity has dig speed, false otherwise.
MobEffectUtil.hasDigSpeed(myLivingEntity);Parameters:
Return Type:
bool
static hasWaterBreathing(entity as LivingEntity) as bool
Checks if the script.zs
LivingEntity has water breathing.Returns: True if the LivingEntity has water breathing, false otherwise.
MobEffectUtil.hasWaterBreathing(myLivingEntity);Parameters:
Return Type:
bool