From 9fe95d850eba869541fd2f0c436666a868710552 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Sun, 3 Apr 2016 02:02:00 -0500 Subject: [PATCH] Mark chunk as active if ChunkUnloadEvent is cancelled Potentially related to GH-169 --- .../Optimize-Chunk-Unload-Queue.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Spigot-Server-Patches/Optimize-Chunk-Unload-Queue.patch b/Spigot-Server-Patches/Optimize-Chunk-Unload-Queue.patch index ef7d7c4b60..eba2190660 100644 --- a/Spigot-Server-Patches/Optimize-Chunk-Unload-Queue.patch +++ b/Spigot-Server-Patches/Optimize-Chunk-Unload-Queue.patch @@ -156,6 +156,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (neighbor != null) { neighbor.setNeighborUnloaded(-x, -z); chunk.setNeighborUnloaded(x, z); + } + } + } ++ // Paper start ++ } else { ++ // Unload event is cancelled, make sure this chunk is marked active ++ markChunkActive(chunk); ++ // Paper end + } + } + // CraftBukkit end @@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { public boolean e(int i, int j) { return this.chunks.containsKey(LongHash.toLong(i, j)); // CraftBukkit