pub trait Chunk: Send + Sync {
// Required methods
fn status(&self) -> String;
fn surface_height(&self, x: usize, z: usize, mode: HeightMode) -> isize;
fn biome(&self, x: usize, y: isize, z: usize) -> Option<Biome>;
fn block(&self, x: usize, y: isize, z: usize) -> Option<&Block>;
fn y_range(&self) -> Range<isize>;
}
Required Methods§
fn status(&self) -> String
sourcefn 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.
sourcefn 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.