pub fn block_at(&self, pos: BlockPosition) -> Option<Block> {
        if pos.y > 255 || pos.y < 0 {
            return None;
        }

        let chunk_pos = pos.chunk_pos();

        if let Some(chunk) = self.chunk_at(chunk_pos) {
            let rpos = chunk_relative_pos(pos);
            Some(chunk.block_at(rpos.0, rpos.1, rpos.2))
        } else {
            None
        }
    }
/// Retrieves the block at the specified
/// location. If the chunk in which the block
/// exists is not laoded, `None` is returned.
Retrieves the block at the specified
location. If the chunk in which the block
exists is not laoded, `None` is returned.
Retrieves the block at the specified location . If the chunk in which the block exists is not laoded ` None ` is returned .
pub fn block_at(&self, pos: BlockPosition) -> Option<Block> {
        if pos.y > 255 || pos.y < 0 {
            return None;
        }
        let chunk_pos = pos.chunk_pos();
        if let Some(chunk) = self.chunk_at(chunk_pos) {
            let rpos = chunk_relative_pos(pos);
            Some(chunk.block_at(rpos.0, rpos.1, rpos.2))
        } else {
            None
        }
    }
pub fn block_at ( & self , pos : BlockPosition ) -> Option < Block > { if pos . y > 255 || pos . y < 0 { return None ; } let chunk_pos = pos . chunk_pos ( ) ; if let Some ( chunk ) = self . chunk_at ( chunk_pos ) { let rpos = chunk_relative_pos ( pos ) ; Some ( chunk . block_at ( rpos . 0 , rpos . 1 , rpos . 2 ) ) } else { None } }
Retrieves the block at the specified
location.
Retrieves the block at the specified location .
&self
pos
BlockPosition
&self
pos
BlockPosition