mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
05466e3b47
Upstream has released updates that appear to apply compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing. Bukkit Changes: d2834556 SPIGOT-4219: Event for PigZombies angering. CraftBukkit Changes:a9c796f1
SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations195f071e
SPIGOT-4219: Event for PigZombies angering.5e3082c7
SPIGOT-4230: Improve legacy block types
39 lines
1.8 KiB
Diff
39 lines
1.8 KiB
Diff
From 88ae26f30c72f35356d81d68a6556611f3e050ea Mon Sep 17 00:00:00 2001
|
|
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
|
|
index e8a943cf74..63ca61c1d6 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -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;
|
|
- public boolean d;
|
|
+ public boolean d; public void setShouldUnload(boolean unload) { this.d = unload; } public boolean isUnloading() { return d; } // Paper - OBFHELPER
|
|
private ChunkStatus D;
|
|
private int E;
|
|
private final AtomicInteger F;
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
index 0e04d65981..2925c345a1 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
@@ -312,6 +312,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
|
|
|
if (chunk != null && chunk.d) {
|
|
// CraftBukkit start - move unload logic to own method
|
|
+ chunk.setShouldUnload(false); // Paper
|
|
if (!unloadChunk(chunk, true)) {
|
|
continue;
|
|
}
|
|
--
|
|
2.18.0
|
|
|