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 net.neoforged.neoforge.event.entity.living.MobEffectEvent
MobEffectEvent.Added, MobEffectEvent.Applicable, MobEffectEvent.Expired, MobEffectEvent.RemoveNested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.SizeNested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result - 
Field Summary
FieldsFields inherited from class net.neoforged.neoforge.event.entity.living.MobEffectEvent
effectInstance - 
Constructor Summary
ConstructorsConstructorDescriptionRemove(LivingEntity living, MobEffectInstance effectInstance, @Nullable EffectCure cure) Remove(LivingEntity living, MobEffect effect, @Nullable EffectCure cure)  - 
Method Summary
Modifier and TypeMethodDescription@Nullable EffectCuregetCure()Returns theEffectCurethe effect is being cured by. Null if the effect is not removed due to being cured.@Nullable MobEffectInstanceMethods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
getEntityMethods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResultMethods inherited from class java.lang.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
 - 
cure
 
 - 
 - 
Constructor Details
- 
Remove
 - 
Remove
@Internal public Remove(LivingEntity living, MobEffectInstance effectInstance, @Nullable @Nullable EffectCure cure)  
 - 
 - 
Method Details
- 
getEffect
- Returns:
 - the 
MobEffectwhich is being removed from the entity 
 - 
getCure
Returns theEffectCurethe effect is being cured by. Null if the effect is not removed due to being cured.- Returns:
 - the 
EffectCurethe effect is being cured by. Null if the effect is not removed due to being cured 
 - 
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. 
 
 -