world: only force filling sky on 1.18+ for now, workaround until mask/fill_sky can be calculated correctly - min_y?

This commit is contained in:
ice_iix 2022-08-06 12:41:39 -07:00
parent 4a8e419d90
commit 0032bf2543
1 changed files with 4 additions and 1 deletions

View File

@ -1109,7 +1109,10 @@ impl World {
if chunk.sections[i].is_none() {
let mut fill_sky = chunk.sections.iter().skip(i).all(|v| v.is_none());
fill_sky &= (mask & !((1 << i) | ((1 << i) - 1))) == 0;
fill_sky = true;
if self.protocol_version >= 757 {
// TODO: fix conditionalizing fill sky on 1.18+
fill_sky = true;
}
if !fill_sky || mask & (1 << i) != 0 {
chunk.sections[i] = Some(Section::new(i as u8, fill_sky));
}