Skip to content

Commit e823621

Browse files
committed
Updates non-air blocks. Doesn't fix it but can't make it worse
1 parent 51947cc commit e823621

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib/world/src/chunk_format.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,16 @@ impl Chunk {
490490
}
491491
}
492492

493+
section.block_states.non_air_blocks = section
494+
.block_states
495+
.block_counts
496+
.iter()
497+
.filter(|(block, _)| {
498+
!["minecraft:air", "minecraft:void_air", "minecraft:cave_air"]
499+
.contains(&block.name.as_str())
500+
})
501+
.map(|(_, count)| *count as u16)
502+
.sum();
493503
Ok(())
494504
}
495505

0 commit comments

Comments
 (0)