Interface FabricMobEffect


public interface FabricMobEffect
An extension for MobEffect subclasses adding basic events.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onEffectAdded(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity)
    Called before an instance of this effect has been added to a living entity.
    default void
    onEffectRemoved(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity)
    Called before an instance of this effect has been removed from a living entity.
    default void
    onEffectStarted(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity)
    Called after an instance of this effect has been added to a living entity.
  • Method Details

    • onEffectAdded

      default void onEffectAdded(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity)
      Called before an instance of this effect has been added to a living entity.
      Parameters:
      effectInstance - an instance of this effect
      entity - the entity the effect instance is being applied to
    • onEffectStarted

      default void onEffectStarted(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity)
      Called after an instance of this effect has been added to a living entity.
      Parameters:
      effectInstance - an instance of this effect
      entity - the entity the effect instance has been applied to
    • onEffectRemoved

      default void onEffectRemoved(net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.LivingEntity entity)
      Called before an instance of this effect has been removed from a living entity.
      Parameters:
      effectInstance - an instance of this effect
      entity - the entity the effect instance is being removed from