Class AbstractModifierEvent<T extends ModifierFunction<M>,M>
java.lang.Object
org.spongepowered.api.event.impl.AbstractEvent
org.spongepowered.api.event.impl.entity.AbstractModifierEvent<T,M>
- Type Parameters:
T
- The modifier type to use
- All Implemented Interfaces:
Event
- Direct Known Subclasses:
AbstractAttackEntityEvent
,AbstractDamageEntityEvent
An abstract base class for implementations of
DamageEntityEvent
.-
Field Summary
Fields inherited from class org.spongepowered.api.event.impl.AbstractEvent
currentOrder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
convertTuple
(M obj, DoubleUnaryOperator function) protected double
finalAmount
(double baseAmount) Gets the modifiers affecting this event.protected void
recalculateDamages
(double baseAmount) Methods inherited from class org.spongepowered.api.event.impl.AbstractEvent
init
-
Field Details
-
originalFinalAmount
protected double originalFinalAmount -
originalModifiers
-
originalModifierMap
-
modifiers
-
modifierFunctions
-
-
Constructor Details
-
AbstractModifierEvent
public AbstractModifierEvent()
-
-
Method Details
-
init
-
convertTuple
-
recalculateDamages
protected void recalculateDamages(double baseAmount) -
finalAmount
protected double finalAmount(double baseAmount) -
modifiers
Gets the modifiers affecting this event.- Returns:
- The list of modifiers
-