Appearance
helix / Slot
Variable: Slot
constSlot:object
Defined in: core/values/enums.ts:116
Typed slot references for item replace/item modify and friends. The single equipment slots are named members so authors write Slot.MAINHAND instead of the bare, typo-prone string "weapon.mainhand"; the indexed containers stay open via the container(n)/hotbar(n) helpers. Each renders to the vanilla slot string an ItemSlot expects.
Type Declaration
CHEST
readonlyCHEST:"armor.chest"="armor.chest"
container
readonlycontainer: (n) =>string
container.<n> - a slot in the target's container (chest, player inventory).
Parameters
n
number
Returns
string
FEET
readonlyFEET:"armor.feet"="armor.feet"
HEAD
readonlyHEAD:"armor.head"="armor.head"
hotbar
readonlyhotbar: (n) =>string
hotbar.<n> - a player's hotbar slot 0-8.
Parameters
n
number
Returns
string
inventory
readonlyinventory: (n) =>string
inventory.<n> - a player's main inventory (the 27 slots above the hotbar), 0-26.
Parameters
n
number
Returns
string
LEGS
readonlyLEGS:"armor.legs"="armor.legs"
MAINHAND
readonlyMAINHAND:"weapon.mainhand"="weapon.mainhand"
OFFHAND
readonlyOFFHAND:"weapon.offhand"="weapon.offhand"