From 043b010acaab5a4faf76b8b6574bfcde9ec26d94 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 19 Jan 2026 10:54:20 -1345 Subject: remove check for block_count and add relevant comment --- azalea-world/src/chunk_storage.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index e170dc83..23da5af5 100644 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -81,6 +81,11 @@ pub struct Chunk { /// A section of a chunk, i.e. a 16*16*16 block area. #[derive(Clone, Debug, Default)] pub struct Section { + /// The number of non-empty blocks in the section, as sent to us by the + /// server. + /// + /// Currently, Azalea does not update this on its own, so it may become out + /// of sync. pub block_count: u16, pub states: PalettedContainer, pub biomes: PalettedContainer, @@ -457,9 +462,7 @@ pub fn get_block_state_from_sections( return None; }; let section = §ions[section_index]; - if section.block_count == 0 { - return Some(BlockState::AIR); - } + let chunk_section_pos = ChunkSectionBlockPos::from(pos); Some(section.get_block_state(chunk_section_pos)) } -- cgit v1.2.3