pub struct Chunk {
pub status: String,
pub sections: SectionTower,
pub heightmap: [i16; 256],
}
Fields§
§status: String
§sections: SectionTower
§heightmap: [i16; 256]
Implementations§
Trait Implementations§
source§impl Chunk for Chunk
impl Chunk for Chunk
fn status(&self) -> String
source§fn surface_height(&self, x: usize, z: usize, mode: HeightMode) -> isize
fn surface_height(&self, x: usize, z: usize, mode: HeightMode) -> isize
Get the height of the first air-like block above something not air-like.
Will panic if given x/z coordinates outside of 0..16.
source§fn biome(&self, x: usize, y: isize, z: usize) -> Option<Biome>
fn biome(&self, x: usize, y: isize, z: usize) -> Option<Biome>
Get the biome of the given coordinate. A biome may not exist if the
section of the chunk accessed is not present. For example,
trying to access the block at height 1234 would return None.
source§impl From<CurrentJavaChunk> for Chunk
impl From<CurrentJavaChunk> for Chunk
source§fn from(current_java_chunk: CurrentJavaChunk) -> Self
fn from(current_java_chunk: CurrentJavaChunk) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnwindSafe for Chunk
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