Class MobEffectEvent.Remove
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.MobEffectEvent
net.neoforged.neoforge.event.entity.living.MobEffectEvent.Remove
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
MobEffectEvent
public static class MobEffectEvent.Remove
extends MobEffectEvent
implements net.neoforged.bus.api.ICancellableEvent
This Event is fired when a
MobEffect is about to get removed from an Entity.
This Event is ICancellableEvent. If canceled, the effect will not be removed.
This Event does not have a result.-
Nested Class Summary
Nested classes/interfaces inherited from class MobEffectEvent
MobEffectEvent.Added, MobEffectEvent.Applicable, MobEffectEvent.Expired, MobEffectEvent.RemoveNested classes/interfaces inherited from class LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size -
Field Summary
FieldsFields inherited from class MobEffectEvent
effectInstance -
Constructor Summary
ConstructorsConstructorDescriptionRemove(LivingEntity living, Holder<MobEffect> effect) Remove(LivingEntity living, MobEffectInstance effectInstance) -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class LivingEvent
getEntityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
effect
-
-
Constructor Details
-
Remove
-
Remove
-
-
Method Details
-
getEffect
-
getEffectInstance
- Overrides:
getEffectInstancein classMobEffectEvent- Returns:
- the
MobEffectInstance. In the remove event, this can be null if the entity does not have aMobEffectof the right type active.
-