struct ChunkBuilder<'a> {
block_states: Vec<PersistentBlockState<'static>>,
biomes: Vec<Identifier>,
registry: &'a Registry,
}Expand description
Builder for creating a persistent chunk with its own palettes.
Fields§
§block_states: Vec<PersistentBlockState<'static>>§biomes: Vec<Identifier>§registry: &'a RegistryImplementations§
Source§impl<'a> ChunkBuilder<'a>
impl<'a> ChunkBuilder<'a>
const fn new(registry: &'a Registry) -> Self
Sourcefn ensure_block_state(&mut self, block_id: BlockStateId) -> u16
fn ensure_block_state(&mut self, block_id: BlockStateId) -> u16
Ensures a block state exists in the chunk’s palette, returning its index.
Sourcefn ensure_biome(&mut self, biome_id: u16) -> u16
fn ensure_biome(&mut self, biome_id: u16) -> u16
Ensures a biome exists in the chunk’s palette, returning its index.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ChunkBuilder<'a>
impl<'a> !UnwindSafe for ChunkBuilder<'a>
impl<'a> Freeze for ChunkBuilder<'a>
impl<'a> Send for ChunkBuilder<'a>
impl<'a> Sync for ChunkBuilder<'a>
impl<'a> Unpin for ChunkBuilder<'a>
impl<'a> UnsafeUnpin for ChunkBuilder<'a>
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<>>