pub enum ContainerBacking {
Virtual,
Block {
position: BlockPosition,
},
}Expand description
How a container window is backed in the world.
Virtual containers exist only on the server as transient GUI state; their slots live on the player entity. Block-backed containers correspond to a real block entity in the world.
Variants§
Virtual
No backing block – a pure GUI menu.
Slots live on the player entity via VirtualContainerSlots
component and are cleaned up when the window closes.
Block
Backed by a block entity at the given position.
Reads and writes go through the block entity stored in the world. Other players viewing the same block see updates via viewer sync.
Fields
§
position: BlockPositionWorld position of the backing block.
Trait Implementations§
Source§impl Clone for ContainerBacking
impl Clone for ContainerBacking
Source§fn clone(&self) -> ContainerBacking
fn clone(&self) -> ContainerBacking
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerBacking
impl Debug for ContainerBacking
Source§impl PartialEq for ContainerBacking
impl PartialEq for ContainerBacking
impl Copy for ContainerBacking
impl Eq for ContainerBacking
impl StructuralPartialEq for ContainerBacking
Auto Trait Implementations§
impl Freeze for ContainerBacking
impl RefUnwindSafe for ContainerBacking
impl Send for ContainerBacking
impl Sync for ContainerBacking
impl Unpin for ContainerBacking
impl UnsafeUnpin for ContainerBacking
impl UnwindSafe for ContainerBacking
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.