From bacc2bbec00d1b2c882dcb7bfc02cce859c48f6e Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 18 Apr 2018 13:03:59 +0100 Subject: [PATCH] re-revert Better reloading of pending unload chunks --- ...r-reloading-of-pending-unload-chunks.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Spigot-Server-Patches/0290-revert-Better-reloading-of-pending-unload-chunks.patch diff --git a/Spigot-Server-Patches/0290-revert-Better-reloading-of-pending-unload-chunks.patch b/Spigot-Server-Patches/0290-revert-Better-reloading-of-pending-unload-chunks.patch new file mode 100644 index 0000000000..60fe16e1a7 --- /dev/null +++ b/Spigot-Server-Patches/0290-revert-Better-reloading-of-pending-unload-chunks.patch @@ -0,0 +1,25 @@ +From 646201cc8906ae473235f5debaf1e585cf84c3d9 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" + +many areas of NMS calls through to this method which means that +the server can easilly keep chunks loaded in certain conditions +even when they're no longer needed. + +diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index 55dada668..2ed3fc40b 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 +