diff --git a/Spigot-Server-Patches/Optimize-NibbleArray-to-use-pooled-buffers.patch b/Spigot-Server-Patches/Optimize-NibbleArray-to-use-pooled-buffers.patch index 9f4766d029..8da92a2eb6 100644 --- a/Spigot-Server-Patches/Optimize-NibbleArray-to-use-pooled-buffers.patch +++ b/Spigot-Server-Patches/Optimize-NibbleArray-to-use-pooled-buffers.patch @@ -57,7 +57,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void a(long i) { if (this.isVisible) { throw new IllegalStateException("writing to visible data"); } // Paper - avoid copying light data - this.data.queueUpdate(i, ((NibbleArray) this.data.getUpdating(i)).b()); // Paper - avoid copying light data -+ this.data.queueUpdate(i, new NibbleArray().markPoolSafe(this.data.getUpdating(i).getCloneIfSet())); // Paper - avoid copying light data - pool safe clone ++ NibbleArray updating = this.data.getUpdating(i); // Paper - pool nibbles ++ this.data.queueUpdate(i, new NibbleArray().markPoolSafe(updating.getCloneIfSet())); // Paper - avoid copying light data - pool safe clone ++ if (updating.cleaner != null) updating.cleaner.run(); // Paper this.c(); } diff --git a/Spigot-Server-Patches/Stop-copy-on-write-operations-for-updating-light-dat.patch b/Spigot-Server-Patches/Stop-copy-on-write-operations-for-updating-light-dat.patch index ab99e06cc8..b47accc3d3 100644 --- a/Spigot-Server-Patches/Stop-copy-on-write-operations-for-updating-light-dat.patch +++ b/Spigot-Server-Patches/Stop-copy-on-write-operations-for-updating-light-dat.patch @@ -103,16 +103,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @Nullable -@@ -0,0 +0,0 @@ public abstract class LightEngineStorageArray