Class LivingDeathEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.living.LivingDeathEvent
-
public class LivingDeathEvent extends LivingEvent
LivingDeathEvent is fired when an Entity dies.
This event is fired whenever an Entity dies inEntityLivingBase#onDeath(DamageSource)
,EntityPlayer#onDeath(DamageSource)
, andEntityPlayerMP#onDeath(DamageSource)
.
This event is fired via theForgeHooks#onLivingDeath(EntityLivingBase, DamageSource)
.
source
contains the DamageSource that caused the entity to die.
This event isCancelable
.
If this event is canceled, the Entity does not die.
This event does not have a result.Event.HasResult
This event is fired on theMinecraftForge.EVENT_BUS
.
-
-
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 DamageSource
source
-
Constructor Summary
Constructors Constructor Description LivingDeathEvent(LivingEntity entity, DamageSource source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DamageSource
getSource()
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
source
private final DamageSource source
-
-
Constructor Detail
-
LivingDeathEvent
public LivingDeathEvent(LivingEntity entity, DamageSource source)
-
-
Method Detail
-
getSource
public DamageSource getSource()
-
-