Enum Class FirearmType

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

public enum FirearmType extends Enum<FirearmType>
This class highlights the different types a Firearm can have.

So there are 2 different firearm actions, OPEN and CLOSE. These actions are triggered based on weapon shooting and reloading. Comments on each type describe when the firearm opens and closes based on those 2 triggers.

Some types also have aliases, REVOLVER and BREAK, for example. This is because these types are called different things by different people.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    FirearmType for bolt action and lever action rifles Shoot: Bang, then open, (bullet goes in), then close Reload: If Empty: Open, reload timer, then close Else: Reload timer Open: Pull lever back Close: Push lever forward
    FirearmType for pump shotguns Shoot: Bang, then open, then close Reload: If Empty: Reload timer, then open, then close Else: Reload timer Open: Pull the pump Close: Push the pump
    FirearmType for revolvers Shoot: Bang Reload: Open, then reload timer, then close Open: Empty shells fall out Close: The block and spin of barrel
    FirearmType Shoot: Bang Reload: If Empty: Open, then reload timer, then close Else: Reload timer Open: Pull slide back Close: Slide returns, a bullet is chambered
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the enum constant of this class with the specified name.
    static FirearmType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • REVOLVER

      public static final FirearmType REVOLVER
      FirearmType for revolvers Shoot: Bang Reload: Open, then reload timer, then close Open: Empty shells fall out Close: The block and spin of barrel
    • PUMP

      public static final FirearmType PUMP
      FirearmType for pump shotguns Shoot: Bang, then open, then close Reload: If Empty: Reload timer, then open, then close Else: Reload timer Open: Pull the pump Close: Push the pump
    • LEVER

      public static final FirearmType LEVER
      FirearmType for bolt action and lever action rifles Shoot: Bang, then open, (bullet goes in), then close Reload: If Empty: Open, reload timer, then close Else: Reload timer Open: Pull lever back Close: Push lever forward
    • SLIDE

      public static final FirearmType SLIDE
      FirearmType Shoot: Bang Reload: If Empty: Open, then reload timer, then close Else: Reload timer Open: Pull slide back Close: Slide returns, a bullet is chambered
  • Method Details

    • values

      public static FirearmType[] 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 FirearmType 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
    • hasShootActions

      public boolean hasShootActions()