pub struct CurrentJavaChunk {
pub data_version: i32,
pub sections: Option<SectionTower<Section>>,
pub heightmaps: Option<Heightmaps>,
pub status: String,
/* private fields */
}
Expand description
A Minecraft chunk.
This type is not designed for accessing all data of a chunk. It provides the
data necessary to render maps for fastanvil. If you need more complete data
you need to write your own chunk struct and implement the serde traits, or
use fastnbt::Value
.
Fields§
§data_version: i32
§sections: Option<SectionTower<Section>>
§heightmaps: Option<Heightmaps>
§status: String
Implementations§
Source§impl CurrentJavaChunk
impl CurrentJavaChunk
pub fn recalculate_heightmap(&self, mode: HeightMode)
Trait Implementations§
Source§impl Chunk for CurrentJavaChunk
impl Chunk for CurrentJavaChunk
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 Debug for CurrentJavaChunk
impl Debug for CurrentJavaChunk
Source§impl<'de> Deserialize<'de> for CurrentJavaChunk
impl<'de> Deserialize<'de> for CurrentJavaChunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 !Freeze for CurrentJavaChunk
impl RefUnwindSafe for CurrentJavaChunk
impl Send for CurrentJavaChunk
impl Sync for CurrentJavaChunk
impl Unpin for CurrentJavaChunk
impl UnwindSafe for CurrentJavaChunk
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