pub enum BlockEntityCreation {
Created(SharedBlockEntity),
NoEntity,
Unimplemented,
}Expand description
Result of invoking a block’s Vanilla block-entity factory.
NoEntity is distinct from Unimplemented: some Vanilla blocks, notably the moving-piston
placeholder, intentionally return no entity from normal block creation even though their
state accepts an explicitly-created block entity.
Variants§
Created(SharedBlockEntity)
The block factory created its entity.
NoEntity
The implemented Vanilla factory intentionally created no entity.
Unimplemented
Steel has not implemented this block’s factory yet.
Implementations§
Source§impl BlockEntityCreation
impl BlockEntityCreation
Sourcepub fn from_registered_factory(entity: Option<SharedBlockEntity>) -> Self
pub fn from_registered_factory(entity: Option<SharedBlockEntity>) -> Self
Converts an optional registered implementation into a factory result.
Sourcepub fn into_created(self) -> Option<SharedBlockEntity>
pub fn into_created(self) -> Option<SharedBlockEntity>
Returns the created entity, if the factory produced one.
Auto Trait Implementations§
impl !RefUnwindSafe for BlockEntityCreation
impl !UnwindSafe for BlockEntityCreation
impl Freeze for BlockEntityCreation
impl Send for BlockEntityCreation
impl Sync for BlockEntityCreation
impl Unpin for BlockEntityCreation
impl UnsafeUnpin for BlockEntityCreation
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>