Skip to main content

chest_with_kind

Function chest_with_kind 

Source
pub(crate) fn chest_with_kind(
    inventory: Shared<PlayerInventory>,
    container_id: u8,
    container: impl Into<ContainerRef>,
    rows: usize,
    kind: impl MenuKind + 'static,
) -> Menu
Expand description

Builds the same layout as chest under a caller-supplied menu kind.

Chest-shaped menus whose validity or close cleanup is not the backing container’s own (the ender chest, whose container belongs to the player rather than the block) share the layout through this.

§Panics

Panics if rows is 0 or greater than 6.