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
This event is
If this event is canceled, the Plant will not gain any exp.
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.LivingVisibilityEventNested 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.SizeNested 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 -
Method Summary
Modifier and TypeMethodDescriptionintintgetPlant()voidsetIncomingExp(int exp) Modify incoming experience.Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityMethods inherited from class net.minecraftforge.eventbus.api.Event
cancel, getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
PlantGainExpEvent
-
-
Method Details
-
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.
-