ChunkData

Trait ChunkData 

Source
pub trait ChunkData {
    // Required methods
    fn from_bytes(bytes: &[u8]) -> Result<Self, ChunkReadError>
       where Self: Sized;
    fn decompressed(&self) -> Chunk;
    fn get_block(&self, loc: (usize, usize, usize, usize)) -> Option<u8>;
}

Required Methods§

Source

fn from_bytes(bytes: &[u8]) -> Result<Self, ChunkReadError>
where Self: Sized,

Deserializes a slice of bytes into chunk-data.

Source

fn decompressed(&self) -> Chunk

Generate the equivalent decompressed chunk-data.

Source

fn get_block(&self, loc: (usize, usize, usize, usize)) -> Option<u8>

(Try to) Get the ID of a block at a given coordinate in 4D space.

Implementors§