> 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/abstractcontainermenu.md).

# AbstractContainerMenu

The slots and state of an open container: a chest, a furnace, the player's inventory.

### Properties

#### carried

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

The stack held on the cursor.

***

#### containerId

> `readonly` **containerId**: `number`

The id the server knows this menu by, 0 for the player's inventory.

***

#### slotCount

> `readonly` **slotCount**: `number`

The number of slots.

***

#### slots

> `readonly` **slots**: [`Slot`](/newgen/api/net/minecraft/world/inventory/slot.md)\[]

Every slot of the menu, in click order.

***

#### stateId

> `readonly` **stateId**: `number`

Counts server updates to this menu, sent along with every slot click.

***

#### type

> `readonly` **type**: `string`

The menu type id, e.g. "minecraft:generic\_9x3".

**Remarks**

Null for the player's inventory, which has no menu type.

**See**

[Menu type ids](https://minecraft.wiki/w/Java_Edition_protocol/Inventory)

### Methods

#### findSlot()

> **findSlot**(`idOrTag`): `number`

The index of the first menu slot holding a matching item, or -1.

**Parameters**

**idOrTag**

`string`

An item id like "minecraft:stone", or a tag with a leading #.

**Returns**

`number`

**See**

[Item ids](https://minecraft.wiki/w/Java_Edition_data_values/Items)

***

#### getSlot()

> **getSlot**(`index`): [`Slot`](/newgen/api/net/minecraft/world/inventory/slot.md)

The slot at an index, or null when there is none.

**Parameters**

**index**

`number`

The menu slot index.

**Returns**

[`Slot`](/newgen/api/net/minecraft/world/inventory/slot.md)
