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
-
public class LivingExperienceDropEvent extends LivingEvent
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 Summary
-
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 Modifier and Type Field Description private PlayerEntity
attackingPlayer
private int
droppedExperiencePoints
private int
originalExperiencePoints
-
Constructor Summary
Constructors Constructor Description LivingExperienceDropEvent(LivingEntity entity, PlayerEntity attackingPlayer, int originalExperience)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayerEntity
getAttackingPlayer()
int
getDroppedExperience()
int
getOriginalExperience()
void
setDroppedExperience(int droppedExperience)
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
attackingPlayer
private final PlayerEntity attackingPlayer
-
originalExperiencePoints
private final int originalExperiencePoints
-
droppedExperiencePoints
private int droppedExperiencePoints
-
-
Constructor Detail
-
LivingExperienceDropEvent
public LivingExperienceDropEvent(LivingEntity entity, PlayerEntity attackingPlayer, int originalExperience)
-
-
Method Detail
-
getDroppedExperience
public int getDroppedExperience()
-
setDroppedExperience
public void setDroppedExperience(int droppedExperience)
-
getAttackingPlayer
public PlayerEntity getAttackingPlayer()
-
getOriginalExperience
public int getOriginalExperience()
-
-