Class PotionEvent.PotionAddedEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
Enclosing class:
PotionEvent

public static class PotionEvent.PotionAddedEvent extends PotionEvent
This Event is fired when a new Potion is added to the Entity. This is also fired if the Entity already has this effect but with different duration/level. This Event is not Cancelable This Event does not have a Result.
  • Field Details

  • Constructor Details

  • Method Details

    • getPotionEffect

      @Nonnull public MobEffectInstance getPotionEffect()
      Description copied from class: PotionEvent
      Retuns the PotionEffect.
      Overrides:
      getPotionEffect in class PotionEvent
      Returns:
      the added PotionEffect. This is the umerged PotionEffect if the old PotionEffect is not null.
    • getOldPotionEffect

      @Nullable public MobEffectInstance getOldPotionEffect()
      Returns:
      the old PotionEffect. THis can be null if the entity did not have an effect of this kind before.
    • getPotionSource

      @Nullable public Entity getPotionSource()
      Returns the entity source of the effect, or null if none exists.
      Returns:
      the entity source of the effect, or null