Readonly
blockThe block that this container is attached to.
The identifier of the container.
Readonly
occupantsThe occupants of the container.
The storage of the container.
The type of the container.
The amount of empty slots in the container.
Whether the container is full.
The size of the container.
The size of the container.
Adds an item stack to the container.
The item stack to add.
Whether the item was successfully added into the container.
Clears all slots in the container.
Clears a slot in the container.
The slot to clear.
Close the container for a player.
The player to close the container for.
Whether the close was initiated by the server.
Gets an item from the container.
The slot to get the item from.
The item in the slot.
Checks if the container is an entity container.
Whether the container is an entity container.
Removes an item from the container.
The slot to remove the item from.
The amount of the item to remove.
Sets an item in the container.
The slot to set the item in.
The item to set.
Shows the container to a player.
The player to show the container to.
Swaps items in the container.
The slot to swap the item from.
The slot to swap the item to.
Optional
otherContainer: ContainerThe other container to swap the item to.
Takes an item from the container.
The slot to take the item from.
The amount of the item to take.
The taken item.
Updates a slot in the container for all the occupants.
The slot to be updated.
Represents a container.