Package com.valhalla.sdk.api.equipment
Enum Class EquipmentSlot
- All Implemented Interfaces:
Serializable,Comparable<EquipmentSlot>,Constable
The eleven worn-item slots in mobile equipment-panel order.
Two different slot numbers exist and they are not interchangeable.
Panel order is the dense 0-10 index the native
slot-action hook accepts. Container slot is
the game's own worn-item numbering, which skips 6, 8, and 11, and is what
every Item.getSlot() in an equipment
snapshot actually carries.
They agree for the first six slots and diverge from the legs down, so
reading a snapshot with a panel index silently returns the wrong armour:
HANDS (panel 7) would match the item worn on the legs (container 7).
Always match snapshots on getContainerSlot().
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EquipmentSlotforContainerSlot(int containerSlot) Resolves a worn-item container slot, the value snapshots carry.static EquipmentSlotforSlot(int slot) Resolves an equipment-panel index.intReturns the game's worn-item container slot, as carried by every item in an equipment snapshot.intgetSlot()Returns the dense equipment-panel index used by native slot actions.static 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
-
HAT
Head slot. -
CAPE
Cape slot. -
AMULET
Amulet slot. -
WEAPON
Weapon slot. -
CHEST
Body or chest slot. -
SHIELD
Shield or off-hand slot. -
LEGS
Leg slot. -
HANDS
Hand slot. -
FEET
Foot slot. -
RING
Ring slot. -
ARROWS
Ammunition slot.
-
-
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
-
getSlot
public int getSlot()Returns the dense equipment-panel index used by native slot actions.- Returns:
- panel index from 0 through 10
-
getContainerSlot
public int getContainerSlot()Returns the game's worn-item container slot, as carried by every item in an equipment snapshot. Skips 6, 8, and 11.- Returns:
- container slot from 0 through 13
-
forSlot
Resolves an equipment-panel index.- Parameters:
slot- panel index- Returns:
- matching equipment slot, or
nullwhen outside 0 through 10
-
forContainerSlot
Resolves a worn-item container slot, the value snapshots carry.- Parameters:
containerSlot- container slot- Returns:
- matching equipment slot, or
nullwhen it is not a worn slot
-