Class PlantGainExpEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
nokunami.floral_warfare.api.event.entity.living.PlantGainExpEvent

public class PlantGainExpEvent extends net.minecraftforge.event.entity.living.LivingEvent
PlantGainExpEvent is fired just before a plant gains experience.

This event is fired via the FWHooks.onPlantExpGain(AbstractPlant, int).

plant contains the Plant that gained exp.
expIn contains the original exp amount that will be added to the Plant.
expNew contains the modifiable exp that will be added to the Plant.

This event is Cancelable.
If this event is canceled, the Plant will not gain any exp.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent

    net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent, net.minecraftforge.event.entity.living.LivingEvent.LivingTickEvent, net.minecraftforge.event.entity.living.LivingEvent.LivingVisibilityEvent

    Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent

    net.minecraftforge.event.entity.EntityEvent.EnteringSection, net.minecraftforge.event.entity.EntityEvent.EntityConstructing, net.minecraftforge.event.entity.EntityEvent.EyeHeight, net.minecraftforge.event.entity.EntityEvent.Size

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlantGainExpEvent(AbstractPlant entity, int incomingExp)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
     
    void
    setIncomingExp(int exp)
    Modify incoming experience.

    Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent

    getEntity

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    cancel, getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlantGainExpEvent

      public PlantGainExpEvent(AbstractPlant entity, int incomingExp)
  • Method Details

    • getPlant

      public AbstractPlant getPlant()
      Returns:
      The plant that gained exp.
    • getOriginalIncomingExp

      public int getOriginalIncomingExp()
      Returns:
      the original incoming experience.
    • getIncomingExp

      public int getIncomingExp()
      Returns:
      the incoming experience.
    • setIncomingExp

      public void setIncomingExp(int exp)
      Modify incoming experience.