From 0032bf2543e0369b792b13d179e86ded149638ea Mon Sep 17 00:00:00 2001 From: ice_iix Date: Sat, 6 Aug 2022 12:41:39 -0700 Subject: [PATCH] world: only force filling sky on 1.18+ for now, workaround until mask/fill_sky can be calculated correctly - min_y? --- src/world/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/world/mod.rs b/src/world/mod.rs index 6cc2e23..d442b80 100644 --- a/src/world/mod.rs +++ b/src/world/mod.rs @@ -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)); }