Interface ShieldItemDamageFunction.MultiplyAdd

Enclosing interface:
ShieldItemDamageFunction<T>

public static interface ShieldItemDamageFunction.MultiplyAdd
The final amount of damage will be constantDamage + fractionalDamage * attackDamage
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    double
    Returns the constant amount of damage taken.
    double
    Returns fractional amount of damage to take, where a factor of 1 means that the amount of durability lost is equal to attack damage, and a factor of 0 that no durability is lost.
    double
    Returns the minimum amount of damage blocked attack must have had, for the item to take damage at all.
  • Method Details

    • builder

    • minAttackDamage

      double minAttackDamage()
      Returns the minimum amount of damage blocked attack must have had, for the item to take damage at all.
      Returns:
      minimum attack damage required for any durability loss
    • constantDamage

      double constantDamage()
      Returns the constant amount of damage taken.
      Returns:
      a constant amount of damage to take
    • fractionalDamage

      double fractionalDamage()
      Returns fractional amount of damage to take, where a factor of 1 means that the amount of durability lost is equal to attack damage, and a factor of 0 that no durability is lost.
      Returns:
      fractional amount of damage to take