diff options
author | MiniDigger | Martin <[email protected]> | 2021-04-16 17:55:10 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-16 15:55:10 +0000 |
commit | 0a9b89c7a84ed7affccad806277bcca0a7d44eaa (patch) | |
tree | 7153715477d2b1de4f751335e11c192b7ca99e12 | |
parent | a08be1ec7cfe9a7aa134a073382407c53264fcba (diff) | |
download | Paper-0a9b89c7a84ed7affccad806277bcca0a7d44eaa.tar.gz Paper-0a9b89c7a84ed7affccad806277bcca0a7d44eaa.zip |
Fix occasional light gen issues for neighbor blocks (#5500)
Co-authored-by: Spottedleaf <[email protected]>
-rw-r--r-- | Spigot-Server-Patches/0493-Optimize-Light-Engine.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch index 6136fa5c24..be7ebd1442 100644 --- a/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0493-Optimize-Light-Engine.patch @@ -472,7 +472,7 @@ index b82420e9a5d42a4383d24921614fe613c640edb9..0fec15e141051863dbf51a2b3e1ace50 private static final int nibbleBucketSizeMultiplier = Integer.getInteger("Paper.nibbleBucketSize", 3072); private static final int maxPoolSize = Integer.getInteger("Paper.maxNibblePoolSize", (int) Math.min(6, Math.max(1, Runtime.getRuntime().maxMemory() / 1024 / 1024 / 1024)) * (nibbleBucketSizeMultiplier * 8)); diff --git a/src/main/java/net/minecraft/world/level/lighting/LightEngineBlock.java b/src/main/java/net/minecraft/world/level/lighting/LightEngineBlock.java -index f6198069e3ca421b4f551939263c7cf8bd5b754e..e8d2415033c5db3c27e10a38e1ea75e60ebd693e 100644 +index f6198069e3ca421b4f551939263c7cf8bd5b754e..29e98864209c51368a91fa9e530c33cbf9830b51 100644 --- a/src/main/java/net/minecraft/world/level/lighting/LightEngineBlock.java +++ b/src/main/java/net/minecraft/world/level/lighting/LightEngineBlock.java @@ -23,9 +23,11 @@ public final class LightEngineBlock extends LightEngineLayer<LightEngineStorageB @@ -551,7 +551,7 @@ index f6198069e3ca421b4f551939263c7cf8bd5b754e..e8d2415033c5db3c27e10a38e1ea75e6 - long j1 = BlockPosition.a(i, enumdirection); - long k1 = SectionPosition.e(j1); + long j1 = BlockPosition.getAdjacent(x, y, z, enumdirection); // Paper -+ long k1 = SectionPosition.getAdjacentFromBlockPos(x, y, z, enumdirection); // Paper ++ long k1 = SectionPosition.blockToSection(j1); // Paper if (k == k1 || ((LightEngineStorageBlock) this.c).g(k1)) { this.b(i, j1, j, flag); |