Interface DamageCalculationEvent.Post
- All Superinterfaces:
Cancellable
,DamageCalculationEvent
,Event
- All Known Subinterfaces:
AttackEntityEvent.Post
,DamageEntityEvent.Post
- All Known Implementing Classes:
AbstractDamageEntityEventPost
- Enclosing interface:
DamageCalculationEvent
Fires after the damage steps and their side effects have been applied.
The steps have been captured and can't be changed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.entity.DamageCalculationEvent
DamageCalculationEvent.Post, DamageCalculationEvent.Pre
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the final damage to deal to the targetedEntity
.history()
Gets theDamageStepHistory
of this damage calculation.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
Methods inherited from interface org.spongepowered.api.event.entity.DamageCalculationEvent
baseDamage, entity
-
Method Details
-
finalDamage
double finalDamage()Gets the final damage to deal to the targetedEntity
. The final damage is the value after the calculation and itsDamageStep
s. The final damage is the amount of health being lost by theEntity
, if health is tracked. To modify the final damage, add a modifier to the step associated toDamageStepTypes.END
.- Returns:
- The final damage
-
history
DamageStepHistory history()Gets theDamageStepHistory
of this damage calculation.- Returns:
- The history.
-