pub enum BlockEntity {
Chest {
slots: Box<[Slot; 27]>,
},
}Expand description
A block entity with typed data.
Each variant holds the state specific to that block type. New variants are added as more interactive blocks are implemented.
Variants§
Chest
A chest with 27 item slots (3 rows of 9).
Implementations§
Source§impl BlockEntity
impl BlockEntity
Sourcepub fn empty_chest() -> Self
pub fn empty_chest() -> Self
Creates a new empty chest block entity.
Sourcepub fn kind(&self) -> BlockEntityKind
pub fn kind(&self) -> BlockEntityKind
Returns the BlockEntityKind discriminator.
Trait Implementations§
Source§impl Clone for BlockEntity
impl Clone for BlockEntity
Source§fn clone(&self) -> BlockEntity
fn clone(&self) -> BlockEntity
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 BlockEntity
impl Debug for BlockEntity
Source§impl From<&BlockEntity> for BlockEntityKind
impl From<&BlockEntity> for BlockEntityKind
Source§fn from(be: &BlockEntity) -> Self
fn from(be: &BlockEntity) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BlockEntity
impl RefUnwindSafe for BlockEntity
impl Send for BlockEntity
impl Sync for BlockEntity
impl Unpin for BlockEntity
impl UnsafeUnpin for BlockEntity
impl UnwindSafe for BlockEntity
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