Paper/Spigot-Server-Patches/0291-revert-Better-reloading-of-pending-unload-chunks.patch

26 lines
1.1 KiB
Diff

From f731aff707b73a5aa7336f8dfbef087bf5668ef1 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
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 55dada66..2ed3fc40 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.14.1.windows.1