Skip to content

Commit 043b010

Browse files
committed
remove check for block_count and add relevant comment
1 parent f850752 commit 043b010

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

azalea-world/src/chunk_storage.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ pub struct Chunk {
8181
/// A section of a chunk, i.e. a 16*16*16 block area.
8282
#[derive(Clone, Debug, Default)]
8383
pub struct Section {
84+
/// The number of non-empty blocks in the section, as sent to us by the
85+
/// server.
86+
///
87+
/// Currently, Azalea does not update this on its own, so it may become out
88+
/// of sync.
8489
pub block_count: u16,
8590
pub states: PalettedContainer<BlockState>,
8691
pub biomes: PalettedContainer<Biome>,
@@ -457,9 +462,7 @@ pub fn get_block_state_from_sections(
457462
return None;
458463
};
459464
let section = &sections[section_index];
460-
if section.block_count == 0 {
461-
return Some(BlockState::AIR);
462-
}
465+
463466
let chunk_section_pos = ChunkSectionBlockPos::from(pos);
464467
Some(section.get_block_state(chunk_section_pos))
465468
}

0 commit comments

Comments
 (0)