pub struct Section {
pub block_count: u16,
pub fluid_count: u16,
pub states: PalettedContainer<BlockState>,
pub biomes: PalettedContainer<Biome>,
}Expand description
A section of a chunk, i.e. a 161616 block area.
Fields§
§block_count: u16The number of non-empty blocks in the section, which is initialized based on a value sent to us by the server.
This may be updated every time Self::get_and_set_block_state is
called.
fluid_count: u16Similar to Self::block_count, but for fluids.
Unlike Self::block_count, this is currently not updated by Azalea.
states: PalettedContainer<BlockState>§biomes: PalettedContainer<Biome>Implementations§
Source§impl Section
impl Section
pub fn get_block_state(&self, pos: ChunkSectionBlockPos) -> BlockState
pub fn get_and_set_block_state( &mut self, pos: ChunkSectionBlockPos, state: BlockState, ) -> BlockState
pub fn get_biome(&self, pos: ChunkSectionBiomePos) -> Biome
pub fn set_biome(&mut self, pos: ChunkSectionBiomePos, biome: Biome)
pub fn get_and_set_biome( &mut self, pos: ChunkSectionBiomePos, biome: Biome, ) -> Biome
Trait Implementations§
Source§impl AzBuf for Section
impl AzBuf for Section
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>
fn azalea_write(&self, buf: &mut impl Write) -> Result<()>
impl StructuralPartialEq for Section
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnsafeUnpin for Section
impl UnwindSafe for Section
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<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.