2018-07-04 07:55:24 +00:00
|
|
|
From 43debbd620fdfdcda18b02c5826c4b1bfeea5979 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-04 07:55:24 +00:00
|
|
|
index ba3ee64f8..857df2937 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-04 07:55:24 +00:00
|
|
|
@@ -75,7 +75,7 @@ public class Chunk {
|
2016-06-23 02:18:41 +00:00
|
|
|
private long w;
|
|
|
|
private int x;
|
2016-11-17 02:23:38 +00:00
|
|
|
private final ConcurrentLinkedQueue<BlockPosition> y;
|
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
|
2016-06-23 02:18:41 +00:00
|
|
|
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
|
2018-07-04 07:55:24 +00:00
|
|
|
index 1771a1794..5cc192bbd 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
|
2017-02-04 09:59:44 +00:00
|
|
|
@@ -299,6 +299,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-04 07:55:24 +00:00
|
|
|
2.18.0
|
2016-06-23 02:18:41 +00:00
|
|
|
|