Skip to content

helix / Slot

Variable: Slot

const Slot: 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

readonly CHEST: "armor.chest" = "armor.chest"

container

readonly container: (n) => string

container.<n> - a slot in the target's container (chest, player inventory).

Parameters

n

number

Returns

string

FEET

readonly FEET: "armor.feet" = "armor.feet"

readonly HEAD: "armor.head" = "armor.head"

hotbar

readonly hotbar: (n) => string

hotbar.<n> - a player's hotbar slot 0-8.

Parameters

n

number

Returns

string

inventory

readonly inventory: (n) => string

inventory.<n> - a player's main inventory (the 27 slots above the hotbar), 0-26.

Parameters

n

number

Returns

string

LEGS

readonly LEGS: "armor.legs" = "armor.legs"

MAINHAND

readonly MAINHAND: "weapon.mainhand" = "weapon.mainhand"

OFFHAND

readonly OFFHAND: "weapon.offhand" = "weapon.offhand"

Released under the MIT License · Credits