T
- The modifier type to usepublic abstract class AbstractModifierEvent<T extends ModifierFunction<M>,M> extends AbstractEvent
DamageEntityEvent
and HealEntityEvent
.Modifier and Type | Field and Description |
---|---|
protected List<T> |
modifierFunctions |
protected LinkedHashMap<M,Double> |
modifiers |
protected double |
originalFinalAmount |
protected Map<M,Double> |
originalModifierMap |
protected List<Tuple<M,Double>> |
originalModifiers |
currentOrder
Constructor and Description |
---|
AbstractModifierEvent() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
convertTuple(M obj,
DoubleUnaryOperator function) |
protected double |
getFinalAmount(double baseAmount) |
List<T> |
getModifiers()
Gets the modifiers affecting this event.
|
protected ImmutableList<T> |
init(double originalValue,
List<T> originalFunctions) |
protected void |
recalculateDamages(double baseAmount) |
init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCause, getContext, getSource
protected double originalFinalAmount
protected final LinkedHashMap<M,Double> modifiers
protected final List<T extends ModifierFunction<M>> modifierFunctions
protected ImmutableList<T> init(double originalValue, List<T> originalFunctions)
protected abstract T convertTuple(M obj, DoubleUnaryOperator function)
protected void recalculateDamages(double baseAmount)
protected double getFinalAmount(double baseAmount)