2016-07-17 03:10:43 +02:00
|
|
|
From 92791e6828546727d6ef0b510e719e54ec9a46bf Mon Sep 17 00:00:00 2001
|
2016-06-23 04:18:41 +02: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
|
2016-06-23 04:43:02 +02:00
|
|
|
index a2d9f62..a1f7e83 100644
|
2016-06-23 04:18:41 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
@@ -46,7 +46,7 @@ public class Chunk {
|
|
|
|
private long w;
|
|
|
|
private int x;
|
|
|
|
private ConcurrentLinkedQueue<BlockPosition> y;
|
|
|
|
- public boolean d;
|
|
|
|
+ public boolean d;public void setShouldUnload(boolean unload) { this.d = unload; } public boolean isUnloading() { return d; } // Paper // OBFHELPER
|
|
|
|
protected gnu.trove.map.hash.TObjectIntHashMap<Class> entityCount = new gnu.trove.map.hash.TObjectIntHashMap<Class>(); // Spigot
|
|
|
|
|
|
|
|
// Paper start
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2016-07-16 00:36:53 +02:00
|
|
|
index d4587c7..804a0ca 100644
|
2016-06-23 04:18:41 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2016-07-16 00:36:53 +02:00
|
|
|
@@ -289,6 +289,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
2016-06-23 04:18:41 +02:00
|
|
|
|
|
|
|
if (chunk != null && chunk.d) {
|
|
|
|
// CraftBukkit start - move unload logic to own method
|
|
|
|
+ chunk.setShouldUnload(false); // Paper
|
|
|
|
if (!unloadChunk(chunk, true)) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
--
|
2016-07-17 03:10:43 +02:00
|
|
|
2.9.0
|
2016-06-23 04:18:41 +02:00
|
|
|
|