Fix light propagation in high y sections

This commit is contained in:
Nassim Jahnke 2021-12-07 20:33:10 +01:00
parent 6d4c9bd717
commit df9844576b

View file

@ -1757,7 +1757,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ final int chunkX = (index % 5) - this.chunkOffsetX;
+ final int chunkZ = ((index / 5) % 5) - this.chunkOffsetZ;
+ final int chunkY = ((index / (5*5)) % (16 + 2 + 2)) - this.chunkOffsetY;
+ final int ySections = (this.maxSection - this.minSection) + 1;
+ final int chunkY = ((index / (5*5)) % (ySections + 2 + 2)) - this.chunkOffsetY;
+ if ((nibble != null && nibble.updateVisible()) || this.notifyUpdateCache[index]) {
+ lightAccess.onLightUpdate(this.skylightPropagator ? LightLayer.SKY : LightLayer.BLOCK, SectionPos.of(chunkX, chunkY, chunkZ));
+ }