aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-01-19 10:54:20 -1345
committermat <git@matdoes.dev>2026-01-20 03:39:24 +0300
commit043b010acaab5a4faf76b8b6574bfcde9ec26d94 (patch)
tree3a1ff04783cdaf151b8dca0fa63f011e91363f9f
parentf850752e056449e49cf805fc4261b252a357b11d (diff)
downloadazalea-drasl-043b010acaab5a4faf76b8b6574bfcde9ec26d94.tar.xz
remove check for block_count and add relevant comment
-rw-r--r--azalea-world/src/chunk_storage.rs9
1 files 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<BlockState>,
pub biomes: PalettedContainer<Biome>,
@@ -457,9 +462,7 @@ pub fn get_block_state_from_sections(
return None;
};
let section = &sections[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))
}