mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
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.
This commit is contained in:
parent
8f4f4bdb16
commit
492ed12781
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
||||||
|
From 0000000000000000000000000000000000000000 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"
|
||||||
|
|
||||||
|
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
|
||||||
|
@@ -0,0 +0,0 @@ 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) {
|
||||||
|
--
|
Loading…
Reference in a new issue