Class DamageFunction
java.lang.Object
org.spongepowered.api.event.cause.entity.damage.DamageFunction
- All Implemented Interfaces:
- ModifierFunction<DamageModifier>
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionDamageFunction(DamageModifier modifier) Creates a newDamageFunctionwith the providedDamageModifier.DamageFunction(DamageModifier modifier, DoubleUnaryOperator function) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanfunction()Gets theDoubleUnaryOperatorfor this function.inthashCode()modifier()Gets theDamageModifierfor this function.static DamageFunctionof(DamageModifier first, DoubleUnaryOperator second) Constructs a new damage function.toString()
- 
Field Details- 
ZERO_DAMAGE
 
- 
- 
Constructor Details- 
DamageFunctionCreates a newDamageFunctionwith the providedDamageModifier. The caveat is that the providedDamageFunctionis by default going to provide0damage modifications.- Parameters:
- modifier- The damage modifier
 
- 
DamageFunction- Parameters:
- modifier- The modifier
- function- The function
 
 
- 
- 
Method Details- 
ofConstructs a new damage function.- Parameters:
- first- The damage modifier to use
- second- The unary operator to use
- Returns:
- The resulting damage function
 
- 
modifierGets theDamageModifierfor this function.- Specified by:
- modifierin interface- ModifierFunction<DamageModifier>
- Returns:
- The damage modifier
 
- 
functionGets theDoubleUnaryOperatorfor this function.- Specified by:
- functionin interface- ModifierFunction<DamageModifier>
- Returns:
- The damage function
 
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
 
-