fixed diagonal light propagations.

This commit is contained in:
gnembon committed 2020-11-29 02:31:13 -04:00
1 parent 973dd29739
commit 685c156f1c
1 file changed
+3 -2
@@ -94,8 +94,9 @@ public abstract class SkyLightStorage_scarpetChunkCreationMixin extends LightSto
final long dst = BlockPos.add(pos, ox + t * dx, dy, oz + t * dz);
long src = BlockPos.offset(dst, dir);
if (neighborLightArray == null)
src = BlockPos.asLong(BlockPos.unpackLongX(src), ChunkSectionPos.getBlockCoord(ChunkSectionPos.unpackY(neighborCeilingSectionPos)), BlockPos.unpackLongZ(src));
// fixed due to https://bugs.mojang.com/browse/MC-196542 so keeping the direction
//if (neighborLightArray == null)
// src = BlockPos.asLong(BlockPos.unpackLongX(src), ChunkSectionPos.getBlockCoord(ChunkSectionPos.unpackY(neighborCeilingSectionPos)), BlockPos.unpackLongZ(src));
final int srcLevel = neighborCeilingLightArray != null ?
((ChunkLightProviderInterface) lightProvider).callGetCurrentLevelFromSection(neighborCeilingLightArray, src)