Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / Slot

Variable: Slot โ€‹

const Slot: object

Defined in: core/values/enums.ts:163

Typed slot names for item replace/item modify, e.g. Slot.MAINHAND. Use container(n)/hotbar(n) for indexed slots.

Type Declaration โ€‹

CHEST โ€‹

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

container โ€‹

readonly container: (n) => SlotRange

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

Parameters โ€‹

n โ€‹

number

Returns โ€‹

SlotRange

CONTENTS โ€‹

readonly CONTENTS: "contents" = "contents"

contents - the one item an item display, item frame or dropped item holds.

crafting โ€‹

readonly crafting: (n) => SlotRange

player.crafting.<n> - a player's 2x2 inventory crafting grid, 0-3.

Parameters โ€‹

n โ€‹

number

Returns โ€‹

SlotRange

CURSOR โ€‹

readonly CURSOR: "player.cursor" = "player.cursor"

player.cursor - the item a player is carrying with the mouse in an open screen.

FEET โ€‹

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

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

hotbar โ€‹

readonly hotbar: (n) => SlotRange

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

Parameters โ€‹

n โ€‹

number

Returns โ€‹

SlotRange

inventory โ€‹

readonly inventory: (n) => SlotRange

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

Parameters โ€‹

n โ€‹

number

Returns โ€‹

SlotRange

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
These docs were written with AI; the layout and every page have been reviewed by a human.