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 TypeMethodDescriptiondoubleGets the final damage to deal to the targetedEntity.history()Gets theDamageStepHistoryof this damage calculation.Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelledMethods 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 itsDamageSteps. 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 theDamageStepHistoryof this damage calculation.- Returns:
- The history.
-