Enum Class EquipmentSlot
- All Implemented Interfaces:
Serializable, Comparable<EquipmentSlot>, Constable
One place an entity wears or holds an item, as an item's
minecraft:equippable component
names it.- Since:
- 0.1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe body armor of an animal: horse armor, wolf armor, llama carpets, harnesses...Chestplates and elytras.Boots.Helmets, heads and carved pumpkins.Leggings.The main hand.The off hand, where a shield is held.The saddle of a mount. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable EquipmentSlotbooleanstatic EquipmentSlotReturns the enum constant of this class with the specified name.static EquipmentSlot[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MAIN_HAND
The main hand. -
OFF_HAND
The off hand, where a shield is held. -
FEET
Boots. -
LEGS
Leggings. -
CHEST
Chestplates and elytras. -
HEAD
Helmets, heads and carved pumpkins. -
BODY
The body armor of an animal: horse armor, wolf armor, llama carpets, harnesses... -
SADDLE
The saddle of a mount.
-
-
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
-
byName
- Parameters:
name- the vanilla name, e.g.head- Returns:
- the matching slot,
nullwhen the name is unknown - Since:
- 0.1.0
-
serializedName
- Returns:
- the vanilla name, e.g.
head - Since:
- 0.1.0
-
isHumanoidArmor
public boolean isHumanoidArmor()- Returns:
truefor the four slots of a player's armor- Since:
- 0.1.0
-