2016-05-28 01:35:28 +00:00
|
|
|
From 315afb375674d27304fae4183a583984e739055f Mon Sep 17 00:00:00 2001
|
2016-05-12 06:07:39 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Thu, 12 May 2016 02:03:56 -0400
|
|
|
|
Subject: [PATCH] Unmark chunk as unloading when unload is cancelled
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
2016-05-15 22:48:39 +00:00
|
|
|
index d7b9581..40d4c9c 100644
|
2016-05-12 06:07:39 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
2016-05-15 22:48:39 +00:00
|
|
|
@@ -47,7 +47,7 @@ public class Chunk {
|
2016-05-12 06:07:39 +00:00
|
|
|
private long w;
|
|
|
|
private int x;
|
|
|
|
private ConcurrentLinkedQueue<BlockPosition> y;
|
|
|
|
- public boolean d;
|
|
|
|
+ public boolean d;public void setShouldUnload(boolean unload) { this.d = unload; } // Paper // OBFHELPER
|
|
|
|
protected gnu.trove.map.hash.TObjectIntHashMap<Class> entityCount = new gnu.trove.map.hash.TObjectIntHashMap<Class>(); // Spigot
|
|
|
|
|
2016-05-15 22:48:39 +00:00
|
|
|
// Paper start
|
2016-05-12 06:07:39 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2016-05-22 03:07:14 +00:00
|
|
|
index 6d1b98b..4a2cad6 100644
|
2016-05-12 06:07:39 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2016-05-22 03:07:14 +00:00
|
|
|
@@ -309,6 +309,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
2016-05-12 06:07:39 +00:00
|
|
|
Chunk chunk = (Chunk) this.chunks.get(olong);
|
|
|
|
|
|
|
|
if (chunk != null && chunk.d) {
|
|
|
|
+ chunk.setShouldUnload(false); // Paper
|
|
|
|
// CraftBukkit start
|
|
|
|
ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk);
|
2016-05-15 22:48:39 +00:00
|
|
|
this.world.getServer().getPluginManager().callEvent(event);
|
2016-05-12 06:07:39 +00:00
|
|
|
--
|
2016-05-28 01:35:28 +00:00
|
|
|
2.7.4 (Apple Git-66)
|
2016-05-12 06:07:39 +00:00
|
|
|
|