Class PotionEvent.PotionApplicableEvent
- 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.PotionApplicableEvent
-
- Enclosing class:
- PotionEvent
public static class PotionEvent.PotionApplicableEvent extends PotionEvent
This Event is fired to check if a Potion can get applied to an Entity. This Event is notCancelable
This Event has a resultEvent.HasResult
. ALLOW will apply this potion effect. DENY will not apply this potion effect. DEFAULT will run vanilla logic to determine if this potion isApplicable.
-
-
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 inherited from class net.minecraftforge.event.entity.living.PotionEvent
effect
-
-
Constructor Summary
Constructors Constructor Description PotionApplicableEvent(LivingEntity living, EffectInstance effect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Constructor Detail
-
PotionApplicableEvent
public PotionApplicableEvent(LivingEntity living, EffectInstance effect)
-
-
Method Detail
-
getPotionEffect
@Nonnull public EffectInstance getPotionEffect()
Description copied from class:PotionEvent
Retuns the PotionEffect.- Overrides:
getPotionEffect
in classPotionEvent
- Returns:
- the PotionEffect.
-
-