Interface DamageModifier
public interface DamageModifier
Represents a modifier that will apply a function on a damage value to deal
 towards an entity such that the raw damage is the input of a
 
DoubleUnaryOperator such that the output will be the final damage
 applied to the Entity.- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder that createsDamageModifiers, for use in both plugin and implementation requirements.
- 
Method SummaryModifier and TypeMethodDescriptionstatic DamageModifier.Builderbuilder()Creates a newDamageModifier.Builderfor constructing aDamageModifier.cause()Gets the cause of thisDamageModifier.Gets the contributingItemStackSnapshotthat provided the "reason" for thisDamageModifierto exist.type()Gets theDamageModifierTypefor thisDamageModifier.
- 
Method Details- 
builderCreates a newDamageModifier.Builderfor constructing aDamageModifier.- Returns:
- A new builder
 
- 
typeDamageModifierType type()Gets theDamageModifierTypefor thisDamageModifier.- Returns:
- The damage modifier type
 
- 
causeCause cause()Gets the cause of thisDamageModifier.- Returns:
- The cause of this damage modifier
 
- 
contributingItemOptional<ItemStackSnapshot> contributingItem()Gets the contributingItemStackSnapshotthat provided the "reason" for thisDamageModifierto exist. An example of a contributingItemStackis if anItemTypes.DIAMOND_SWORDprovided anEnchantmentthat provided aDamageModifierTypes.WEAPON_ENCHANTMENT, this modifier would have theItemStackSnapshotfor the weapon used. Some modifiers however, do not require anItemStackto be the contributing factor for this modifier to exist.- Returns:
- The contributing item, if available
 
 
-