Package net.xun.armory.api.item.armor
Enum Class ArmorType
- All Implemented Interfaces:
Serializable,Comparable<ArmorType>,Constable,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.Typefor protection and durability calculations - An
EquipmentSlotfor player equipment management
base_name + suffix.
Example Naming: For base name "diamond":
| ArmorType | Full Name |
|---|---|
| HELMET | diamond_helmet |
| CHESTPLATE | diamond_chestplate |
| LEGGINGS | diamond_leggings |
| BOOTS | diamond_boots |
- Since:
- 1.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFoot protection armor pieceBody protection armor pieceHead protection armor pieceLeg protection armor piece -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ArmorItem.TypeGets the Minecraft armor type for protection and durability calculations.net.minecraft.world.entity.EquipmentSlotGets the equipment slot where this armor piece is worn.Gets the registration suffix for this armor type.static ArmorTypeReturns the enum constant of this class with the specified name.static ArmorType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HELMET
Head protection armor piece -
CHESTPLATE
Body protection armor piece -
LEGGINGS
Leg protection armor piece -
BOOTS
Foot protection armor piece
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
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:
getNameSuffixin interfacePieceType- 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
-