Skip to main content

basalt_api/components/
container.rs

1//! Component for storing slots of virtual (non-block-backed) containers.
2
3use crate::components::Component;
4
5/// Holds the slot contents of a virtual container window.
6///
7/// Set on a player entity when they open a virtual container (GUI menu
8/// with no backing block). Removed on CloseWindow. For block-backed
9/// containers, slots live in the block entity instead.
10#[derive(Debug, Clone)]
11pub struct VirtualContainerSlots {
12    /// The container slots (count matches `inventory_type.slot_count()`).
13    pub slots: Vec<basalt_types::Slot>,
14}
15
16impl Component for VirtualContainerSlots {}