pub struct Column { /* private fields */ }Expand description
A loaded chunk column: 16 sections (None = all air), biomes and optional light.
Implementations§
Source§impl Column
impl Column
Sourcepub fn raw(&self, x: i32, y: i32, z: i32) -> u16
pub fn raw(&self, x: i32, y: i32, z: i32) -> u16
Raw state at column-local x, z (only the low four bits are used) and world y.
y outside 0..256 is air (0), as in vanilla.
Sourcepub fn set_raw(&mut self, x: i32, y: i32, z: i32, state: u16)
pub fn set_raw(&mut self, x: i32, y: i32, z: i32, state: u16)
Sets the raw state at column-local x, z and world y (ignored outside 0..256).
Sourcepub fn block_entities(&self) -> impl Iterator<Item = ([u8; 3], &BlockEntity)>
pub fn block_entities(&self) -> impl Iterator<Item = ([u8; 3], &BlockEntity)>
Block entities as ([x, y, z] column-local, data), in arrival order. Empty unless
crate::WorldConfig::block_entities is on.
Sourcepub fn block_entity(&self, x: i32, y: i32, z: i32) -> Option<&BlockEntity>
pub fn block_entity(&self, x: i32, y: i32, z: i32) -> Option<&BlockEntity>
The block entity at column-local x, z (low four bits) and world y.
Sourcepub fn section(&self, index: usize) -> Option<&Section>
pub fn section(&self, index: usize) -> Option<&Section>
The section at index 0..16 (y >> 4); None when it is all air.
Sourcepub fn block_light(&self, x: i32, y: i32, z: i32) -> Option<u8>
pub fn block_light(&self, x: i32, y: i32, z: i32) -> Option<u8>
1.8 block light at column-local x, z and world y, when light is kept and the section
was sent. Light is never recomputed after block changes.
Sourcepub fn sky_light(&self, x: i32, y: i32, z: i32) -> Option<u8>
pub fn sky_light(&self, x: i32, y: i32, z: i32) -> Option<u8>
1.8 sky light (see Column::block_light); None also in dimensions without sky.
Sourcepub fn section_count(&self) -> usize
pub fn section_count(&self) -> usize
Number of non-empty sections.
Sourcepub fn heap_bytes(&self) -> usize
pub fn heap_bytes(&self) -> usize
Heap bytes owned by this column (sections, biomes, light), excluding the map entry.