From 280e8b14cafa83742a4736a5ca477706cedae2b5 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 8 Apr 2018 01:26:37 +0100 Subject: [PATCH] revert "Better reloading of pending unload chunks" This change by spigot ensures that many interactins with chunks, e.g. getting a list of TEs will cause the chunk to be marked for not unloading and will block their unload. This is especially true for servers using Timings (it needs to access the TE list of chunks), or any plugins which need to access entity/TE lists periodically. --- ...r-reloading-of-pending-unload-chunks.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Spigot-Server-Patches/0287-revert-Better-reloading-of-pending-unload-chunks.patch diff --git a/Spigot-Server-Patches/0287-revert-Better-reloading-of-pending-unload-chunks.patch b/Spigot-Server-Patches/0287-revert-Better-reloading-of-pending-unload-chunks.patch new file mode 100644 index 000000000..1903c4c61 --- /dev/null +++ b/Spigot-Server-Patches/0287-revert-Better-reloading-of-pending-unload-chunks.patch @@ -0,0 +1,27 @@ +From f7eea67c0f0d721d72f84c1f3ef068bcbd356a13 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Sun, 8 Apr 2018 01:21:23 +0100 +Subject: [PATCH] revert "Better reloading of pending unload chunks" + +This change by spigot ensures that many interactins with chunks, +e.g. getting a list of TEs will cause the chunk to be marked for not +unloading and will block their unload. This is especially true for +servers using Timings (it needs to access the TE list of chunks), or +any plugins which need to access entity/TE lists periodically. + +diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index de859ffd1..1e84afb0a 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -148,7 +148,7 @@ public class ChunkProviderServer implements IChunkProvider { + } + + public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) { +- Chunk chunk = getLoadedChunkAt(i, j); ++ Chunk chunk = getChunkIfLoaded(i, j); // Paper - revert "Better reloading of pending unload chunks" (see patch) + ChunkRegionLoader loader = null; + + if (this.chunkLoader instanceof ChunkRegionLoader) { +-- +2.17.0 +