Enum Class ArmorType

java.lang.Object
java.lang.Enum<ArmorType>
net.xun.armory.api.item.armor.ArmorType
All Implemented Interfaces:
Serializable, Comparable<ArmorType>, Constable, PieceType

public enum ArmorType extends Enum<ArmorType> implements PieceType
Enumerates the four standard armor piece types in Minecraft with their associated metadata.

This enum defines the complete set of wearable armor pieces, each with:

  • A registration suffix for automatic naming
  • An ArmorItem.Type for protection and durability calculations
  • An EquipmentSlot for player equipment management
The naming convention follows Minecraft's standard: base_name + suffix.

Example Naming: For base name "diamond":
Armor Piece Naming
ArmorTypeFull Name
HELMETdiamond_helmet
CHESTPLATEdiamond_chestplate
LEGGINGSdiamond_leggings
BOOTSdiamond_boots
Since:
1.0.0
See Also:
  • Enum Constant Details

    • HELMET

      public static final ArmorType HELMET
      Head protection armor piece
    • CHESTPLATE

      public static final ArmorType CHESTPLATE
      Body protection armor piece
    • LEGGINGS

      public static final ArmorType LEGGINGS
      Leg protection armor piece
    • BOOTS

      public static final ArmorType BOOTS
      Foot protection armor piece
  • Method Details

    • values

      public static ArmorType[] 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 ArmorType 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
    • getNameSuffix

      public String getNameSuffix()
      Gets the registration suffix for this armor type.

      This suffix is concatenated with the base name to form the complete registry ID for the armor piece.

      Specified by:
      getNameSuffix in interface PieceType
      Returns:
      the registration suffix, never null
    • getArmorType

      public net.minecraft.world.item.ArmorItem.Type getArmorType()
      Gets the Minecraft armor type for protection and durability calculations.
      Returns:
      the Minecraft armor type, never null
    • getEquipmentSlot

      public net.minecraft.world.entity.EquipmentSlot getEquipmentSlot()
      Gets the equipment slot where this armor piece is worn.

      This determines the player inventory slot and equipment rendering position for the armor piece.

      Returns:
      the equipment slot for this armor type, never null