fn create_chunk_lighting_data(&self, pos: ChunkPos) -> ChunkLightingData {
        let mut chunks = Vec::with_capacity(27);
        let mut highest_opaque_blocks = Vec::with_capacity(9);

        for i in -1..=1 {
            for k in -1..=1 {
                let pos: ChunkPosXZ = pos.offset(i, 0, k).into();
                highest_opaque_blocks.push(
                    (*self.chunk_columns
                        .get(&pos)
                        .map(|server_chunk| &server_chunk.highest_opaque_block)
                        .unwrap_or_else(|| &*EMPTY_HOB))
                        .clone()
                );
            }
        }

        for i in -1..=1 {
            for j in -1..=1 {
                for k in -1..=1 {
                    let pos = pos.offset(i, j, k);
                    chunks.push(self.get_chunk(pos));
                }
            }
        }

        ChunkLightingData { chunks, highest_opaque_blocks }
    }
/// Create a `ChunkLightingData` for a loaded chunk
Create a `ChunkLightingData` for a loaded chunk
Create a ` ChunkLightingData ` for a loaded chunk
fn create_chunk_lighting_data(&self, pos: ChunkPos) -> ChunkLightingData {
        let mut chunks = Vec::with_capacity(27);
        let mut highest_opaque_blocks = Vec::with_capacity(9);
        for i in -1..=1 {
            for k in -1..=1 {
                let pos: ChunkPosXZ = pos.offset(i, 0, k).into();
                highest_opaque_blocks.push(
                    (*self.chunk_columns
                        .get(&pos)
                        .map(|server_chunk| &server_chunk.highest_opaque_block)
                        .unwrap_or_else(|| &*EMPTY_HOB))
                        .clone()
                );
            }
        }
        for i in -1..=1 {
            for j in -1..=1 {
                for k in -1..=1 {
                    let pos = pos.offset(i, j, k);
                    chunks.push(self.get_chunk(pos));
                }
            }
        }
        ChunkLightingData { chunks, highest_opaque_blocks }
    }
fn create_chunk_lighting_data ( & self , pos : ChunkPos ) -> ChunkLightingData { let mut chunks = Vec :: with_capacity ( 27 ) ; let mut highest_opaque_blocks = Vec :: with_capacity ( 9 ) ; for i in - 1 ..= 1 { for k in - 1 ..= 1 { let pos : ChunkPosXZ = pos . offset ( i , 0 , k ) . into ( ) ; highest_opaque_blocks . push ( ( * self . chunk_columns . get ( & pos ) . map ( | server_chunk | & server_chunk . highest_opaque_block ) . unwrap_or_else ( | | & * EMPTY_HOB ) ) . clone ( ) ) ; } } for i in - 1 ..= 1 { for j in - 1 ..= 1 { for k in - 1 ..= 1 { let pos = pos . offset ( i , j , k ) ; chunks . push ( self . get_chunk ( pos ) ) ; } } } ChunkLightingData { chunks , highest_opaque_blocks } }
Create a `ChunkLightingData` for a loaded chunk
Create a ` ChunkLightingData ` for a loaded chunk
&self
pos
ChunkPos
&self
pos
ChunkPos