Class PotionEvent.PotionRemoveEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.living.PotionEvent
-
- net.minecraftforge.event.entity.living.PotionEvent.PotionRemoveEvent
-
- Enclosing class:
- PotionEvent
public static class PotionEvent.PotionRemoveEvent extends PotionEvent
This Event is fired when a Potion is about to get removed from an Entity. This Event isCancelable
. This Event does not have a result.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.PotionEvent
PotionEvent.PotionAddedEvent, PotionEvent.PotionApplicableEvent, PotionEvent.PotionExpiryEvent, PotionEvent.PotionRemoveEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Field Summary
Fields Modifier and Type Field Description private Effect
potion
-
Fields inherited from class net.minecraftforge.event.entity.living.PotionEvent
effect
-
-
Constructor Summary
Constructors Constructor Description PotionRemoveEvent(LivingEntity living, Effect potion)
PotionRemoveEvent(LivingEntity living, EffectInstance effect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Effect
getPotion()
EffectInstance
getPotionEffect()
Retuns the PotionEffect.-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
potion
private final Effect potion
-
-
Constructor Detail
-
PotionRemoveEvent
public PotionRemoveEvent(LivingEntity living, Effect potion)
-
PotionRemoveEvent
public PotionRemoveEvent(LivingEntity living, EffectInstance effect)
-
-
Method Detail
-
getPotion
public Effect getPotion()
- Returns:
- the Potion which is tried to remove from the Entity.
-
getPotionEffect
@Nullable public EffectInstance getPotionEffect()
Description copied from class:PotionEvent
Retuns the PotionEffect.- Overrides:
getPotionEffect
in classPotionEvent
- Returns:
- the PotionEffect. In the remove event this can be null if the Entity does not have a
Potion
of the right type active.
-
-