> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/api/net/minecraft/world/inventory/slot.md).

# Slot

One slot of an open container menu.

### Properties

#### containerSlot

> `readonly` **containerSlot**: `number`

The position of this slot in the container behind it, e.g. 0 to 35 for a player inventory slot.

**Remarks**

Hotbar slots are 36 to 44 in the inventory menu but 0 to 8 here.

***

#### index

> `readonly` **index**: `number`

The position of this slot in the menu, as used when clicking.

***

#### isActive

> `readonly` **isActive**: `boolean`

Whether the slot is currently shown and usable.

***

#### isInPlayerInventory

> `readonly` **isInPlayerInventory**: `boolean`

Whether this slot shows one of the player's own inventory slots, not the opened container's.

***

#### item

> `readonly` **item**: [`ItemStack`](/newgen/api/net/minecraft/world/item/itemstack.md)

The stack in this slot.

***

#### maxStackSize

> `readonly` **maxStackSize**: `number`

How many items this slot holds at most.

***

#### x

> `readonly` **x**: `number`

The horizontal position inside the screen's window, in GUI pixels.

***

#### y

> `readonly` **y**: `number`

The vertical position inside the screen's window, in GUI pixels.

### Methods

#### hasItem()

> **hasItem**(): `boolean`

Whether the slot holds anything.

**Returns**

`boolean`

***

#### mayPickup()

> **mayPickup**(): `boolean`

Whether the local player may take the stack out, e.g. false for a locked output.

**Returns**

`boolean`

***

#### mayPlace()

> **mayPlace**(`stack`): `boolean`

Whether the stack is allowed in this slot, e.g. only armor in an armor slot.

**Parameters**

**stack**

[`ItemStack`](/newgen/api/net/minecraft/world/item/itemstack.md)

The stack to check.

**Returns**

`boolean`
