Class MobEffectEvent

java.lang.Object
net.neoforged.bus.api.Event
Direct Known Subclasses:
MobEffectEvent.Added, MobEffectEvent.Applicable, MobEffectEvent.Expired, MobEffectEvent.Remove

public abstract class MobEffectEvent extends LivingEvent
This event is fired when an interaction between a LivingEntity and MobEffectInstance happens.

All children of this event are fired on the NeoForge.EVENT_BUS.

  • Field Details

    • effectInstance

      @Nullable protected final @Nullable net.minecraft.world.effect.MobEffectInstance effectInstance
  • Constructor Details

    • MobEffectEvent

      protected MobEffectEvent(net.minecraft.world.entity.LivingEntity living, net.minecraft.world.effect.MobEffectInstance effectInstance)
  • Method Details

    • getEffectInstance

      @Nullable public @Nullable net.minecraft.world.effect.MobEffectInstance getEffectInstance()