2018-07-22 05:27:46 +00:00
|
|
|
From 570d7c506c2cc65f5899a4ca5e6b5cd5c2f38182 Mon Sep 17 00:00:00 2001
|
2016-06-23 02:18:41 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Thu, 12 May 2016 02:03:56 -0400
|
|
|
|
Subject: [PATCH] Fix Chunk Unload Queue Issues
|
|
|
|
|
|
|
|
Vanilla implemented similar logic as Paper had pre 1.9.4, but Spigot
|
|
|
|
has not resolved all the bugs with the changes.
|
|
|
|
|
|
|
|
This patch fixes known issues and really should be applied by Spigot team.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
2018-07-22 05:27:46 +00:00
|
|
|
index 49c5953fb..8da7e39ee 100644
|
2016-06-23 02:18:41 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2018-07-16 15:34:55 +00:00
|
|
|
@@ -58,7 +58,7 @@ public class Chunk implements IChunkAccess {
|
|
|
|
private long A; public long getInhabitedTime() { return A; } // Paper - OBFHELPER
|
|
|
|
private int B;
|
|
|
|
private final ConcurrentLinkedQueue<BlockPosition> C;
|
2016-06-23 02:18:41 +00:00
|
|
|
- public boolean d;
|
2016-11-17 02:23:38 +00:00
|
|
|
+ public boolean d; public void setShouldUnload(boolean unload) { this.d = unload; } public boolean isUnloading() { return d; } // Paper - OBFHELPER
|
2018-07-16 15:34:55 +00:00
|
|
|
private ChunkStatus D;
|
|
|
|
private int E;
|
|
|
|
private final AtomicInteger F;
|
2016-06-23 02:18:41 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2018-07-22 05:27:46 +00:00
|
|
|
index 6917fdbe0..bac5c921b 100644
|
2016-06-23 02:18:41 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2018-07-22 05:27:46 +00:00
|
|
|
@@ -301,6 +301,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
2016-06-23 02:18:41 +00:00
|
|
|
|
|
|
|
if (chunk != null && chunk.d) {
|
|
|
|
// CraftBukkit start - move unload logic to own method
|
|
|
|
+ chunk.setShouldUnload(false); // Paper
|
|
|
|
if (!unloadChunk(chunk, true)) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
--
|
2018-07-19 04:42:43 +00:00
|
|
|
2.18.0
|
2016-06-23 02:18:41 +00:00
|
|
|
|