From 0c6cdf5c68ab0c4c20478383ca5e6bcbfcfc6d8d Mon Sep 17 00:00:00 2001 From: MrHua269 Date: Sun, 21 Jul 2024 22:08:58 +0800 Subject: [PATCH] Synchronized neighbor updates --- patches/server/0003-Base-Dirty-Patches.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patches/server/0003-Base-Dirty-Patches.patch b/patches/server/0003-Base-Dirty-Patches.patch index e608564..1575353 100644 --- a/patches/server/0003-Base-Dirty-Patches.patch +++ b/patches/server/0003-Base-Dirty-Patches.patch @@ -1064,6 +1064,19 @@ index 34c0d9fe03cc834e949889f9c4f8269206c18040..4953371d205a1c3982a29252a51dcc99 public final Vec3 speed; public final float yRot; public final float xRot; +diff --git a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java +index a6bc5c5053f1fce822166d0cd1ea67dc490dc0af..189d9dd4716434b4a206b321118d8558fab01434 100644 +--- a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java ++++ b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java +@@ -67,7 +67,7 @@ public class CollectingNeighborUpdater implements NeighborUpdater { + } + } + +- private void runUpdates() { ++ private synchronized void runUpdates() { + try { + while (!this.stack.isEmpty() || !this.addedThisLayer.isEmpty()) { + for (int i = this.addedThisLayer.size() - 1; i >= 0; i--) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index ea8852c2b4143e577c2798d63071287eb1c77db6..b5535cba7a2029e6947aed277323fe52f7c69f9d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java