Enum Class DamagePoint

java.lang.Object
java.lang.Enum<DamagePoint>
me.deecaad.weaponmechanics.weapon.damage.DamagePoint
All Implemented Interfaces:
Serializable, Comparable<DamagePoint>, Constable

public enum DamagePoint extends Enum<DamagePoint>
This class highlights different points in a hit box. Basically having child hit boxes inside of parent hit boxes

Back-stabs are not in here because a back-stab may also be head-shot, or a leg shot. It makes more sense for back-stabs to be handled outside of this class because

Note that the rules defined here are fairly generalized. Entities that are horizontal (Like sheep, cows, etc.) are going to have slightly different rules than vertical mobs.

  • Enum Constant Details

    • BODY

      public static final DamagePoint BODY
      If the damage is hitting body
    • ARMS

      public static final DamagePoint ARMS
      If the damage is hitting body AND the damage came from the side (35 degrees from the side maximum)
    • LEGS

      public static final DamagePoint LEGS
      If the damage is hitting legs
    • FEET

      public static final DamagePoint FEET
      If the damage is hitting feet
  • Method Details

    • values

      public static DamagePoint[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DamagePoint valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getReadable

      public String getReadable()