3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Fix occasional light gen issues for neighbor blocks (#5500)

Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Dieser Commit ist enthalten in:
MiniDigger | Martin 2021-04-16 17:55:10 +02:00 committet von GitHub
Ursprung a08be1ec7c
Commit 0a9b89c7a8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -472,7 +472,7 @@ index b82420e9a5d42a4383d24921614fe613c640edb9..0fec15e141051863dbf51a2b3e1ace50
private static final int nibbleBucketSizeMultiplier = Integer.getInteger("Paper.nibbleBucketSize", 3072); 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)); 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 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 --- a/src/main/java/net/minecraft/world/level/lighting/LightEngineBlock.java
+++ b/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 @@ -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 j1 = BlockPosition.a(i, enumdirection);
- long k1 = SectionPosition.e(j1); - long k1 = SectionPosition.e(j1);
+ long j1 = BlockPosition.getAdjacent(x, y, z, enumdirection); // Paper + 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)) { if (k == k1 || ((LightEngineStorageBlock) this.c).g(k1)) {
this.b(i, j1, j, flag); this.b(i, j1, j, flag);