Class LivingExperienceDropEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.LivingExperienceDropEvent
Event for when an entity drops experience on its death, can be used to change
 the amount of experience points dropped or completely prevent dropping of experience
 by canceling the event.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEventLivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEventEntityEvent.EnteringSection, EntityEvent.EntityConstructingNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionLivingExperienceDropEvent(LivingEntity entity, @Nullable Player attackingPlayer, int originalExperience) 
- 
Method SummaryModifier and TypeMethodDescription@Nullable PlayerintintvoidsetDroppedExperience(int droppedExperience) Methods inherited from class net.minecraftforge.event.entity.living.LivingEventgetEntityMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
attackingPlayer
- 
originalExperiencePointsprivate final int originalExperiencePoints
- 
droppedExperiencePointsprivate int droppedExperiencePoints
 
- 
- 
Constructor Details- 
LivingExperienceDropEventpublic LivingExperienceDropEvent(LivingEntity entity, @Nullable @Nullable Player attackingPlayer, int originalExperience) 
 
- 
- 
Method Details- 
getDroppedExperiencepublic int getDroppedExperience()
- 
setDroppedExperiencepublic void setDroppedExperience(int droppedExperience) 
- 
getAttackingPlayer- Returns:
- The player that last attacked the entity and thus caused the experience. This can be null, in case the player has since logged out.
 
- 
getOriginalExperiencepublic int getOriginalExperience()
 
-