pub struct WorldgenStateResolver;Expand description
Resolves vanilla JSON/NBT block-state data to Steel block-state ids.
Implementations§
Source§impl WorldgenStateResolver
impl WorldgenStateResolver
Sourcepub fn block_state_from_data(
registry: &Registry,
data: &BlockStateData,
context: &str,
) -> BlockStateId
pub fn block_state_from_data( registry: &Registry, data: &BlockStateData, context: &str, ) -> BlockStateId
Resolves a block state from data.
§Panics
Panics if the block is not in the registry or if the state properties are invalid.
Sourcepub fn feature_block_state_from_data(
registry: &Registry,
data: &BlockStateData,
context: &str,
) -> BlockStateId
pub fn feature_block_state_from_data( registry: &Registry, data: &BlockStateData, context: &str, ) -> BlockStateId
fn block_state_from_parts<'a>( registry: &Registry, block: BlockRef, block_name: &Identifier, data_properties: impl IntoIterator<Item = (&'a str, &'a str)>, context: &str, ) -> BlockStateId
Auto Trait Implementations§
impl Freeze for WorldgenStateResolver
impl RefUnwindSafe for WorldgenStateResolver
impl Send for WorldgenStateResolver
impl Sync for WorldgenStateResolver
impl Unpin for WorldgenStateResolver
impl UnsafeUnpin for WorldgenStateResolver
impl UnwindSafe for WorldgenStateResolver
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<>>