fn update_chunk_column(&mut self, pos: ChunkPos) {
        let column_pos = pos.into();

        // Update chunk HOB
        let hob = HighestOpaqueBlock::from_chunk(&self.chunks.get(&pos).unwrap().chunk);
        let column = self.chunk_columns.get_mut(&column_pos).unwrap();
        column.highest_opaque_blocks.insert(pos.py, hob);

        // TODO: don't update entire column, try to be more clever

        // Update column HOB
        let mut column_hob = HighestOpaqueBlock::new();
        for (_, chunk_hob) in column.highest_opaque_blocks.iter() {
            column_hob.merge(chunk_hob);
        }
        column.highest_opaque_block = Arc::new(column_hob);
        
        for i in -1..=1 {
            for k in -1..=1 {
                self.update_column_light(column_pos.offset(i, k));
            }
        }
    }
/// Update the highest opaque block in the column, and mark relevant chunks for a light update.
/// To be called after every chunk loading or modification.
Update the highest opaque block in the column, and mark relevant chunks for a light update.
To be called after every chunk loading or modification.
Update the highest opaque block in the column and mark relevant chunks for a light update . To be called after every chunk loading or modification .
fn update_chunk_column(&mut self, pos: ChunkPos) {
        let column_pos = pos.into();
        // Update chunk HOB
        let hob = HighestOpaqueBlock::from_chunk(&self.chunks.get(&pos).unwrap().chunk);
        let column = self.chunk_columns.get_mut(&column_pos).unwrap();
        column.highest_opaque_blocks.insert(pos.py, hob);
        // TODO: don't update entire column, try to be more clever
        // Update column HOB
        let mut column_hob = HighestOpaqueBlock::new();
        for (_, chunk_hob) in column.highest_opaque_blocks.iter() {
            column_hob.merge(chunk_hob);
        }
        column.highest_opaque_block = Arc::new(column_hob);
        for i in -1..=1 {
            for k in -1..=1 {
                self.update_column_light(column_pos.offset(i, k));
            }
        }
    }
fn update_chunk_column ( & mut self , pos : ChunkPos ) { let column_pos = pos . into ( ) ; // Update chunk HOB let hob = HighestOpaqueBlock :: from_chunk ( & self . chunks . get ( & pos ) . unwrap ( ) . chunk ) ; let column = self . chunk_columns . get_mut ( & column_pos ) . unwrap ( ) ; column . highest_opaque_blocks . insert ( pos . py , hob ) ; // TODO: don't update entire column, try to be more clever // Update column HOB let mut column_hob = HighestOpaqueBlock :: new ( ) ; for ( _ , chunk_hob ) in column . highest_opaque_blocks . iter ( ) { column_hob . merge ( chunk_hob ) ; } column . highest_opaque_block = Arc :: new ( column_hob ) ; for i in - 1 ..= 1 { for k in - 1 ..= 1 { self . update_column_light ( column_pos . offset ( i , k ) ) ; } } }
Update the highest opaque block in the column, and mark relevant chunks for a light update.
Update the highest opaque block in the column and mark relevant chunks for a light update .
&mut self
pos
ChunkPos
&mut self
pos
ChunkPos