Class LivingDamageEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.LivingDamageEvent
- Direct Known Subclasses:
LivingDamageEvent.Post
,LivingDamageEvent.Pre
LivingDamageEvent captures an entity's loss of health. At this stage in
the damage sequence, all reduction effects have been applied.
LivingDamageEvent.Pre
allows for modification of the damage value before it is applied
to the entity's health.
LivingDamageEvent.Post
contains an immutable representation of the entire damage sequence
and allows for reference to the values accrued at each step.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
LivingDamageEvent.Post is fired after health is modified on the entity.
The fields in this event represent the FINAL values of what was applied to the entity.static class
LivingDamageEvent.Pre is fired when an Entity is set to be hurt.Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
LivingDamageEvent
(net.minecraft.world.entity.LivingEntity entity) -
Method Summary
Methods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
-
Constructor Details
-
LivingDamageEvent
private LivingDamageEvent(net.minecraft.world.entity.LivingEntity entity)
-