summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2016-03-02 21:27:49 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2016-03-02 21:29:11 +0000
commit8447e4f3edbd76a07b53da249d11a1ce7af42c7a (patch)
treee2e14350c036a25ad0a17d4fdd45b2a459556e3c /nms-patches
parent6f032cdc8ab6bc4eeefeecd3fde8ba8fbde18f0f (diff)
downloadcraftbukkit-8447e4f3edbd76a07b53da249d11a1ce7af42c7a.tar
craftbukkit-8447e4f3edbd76a07b53da249d11a1ce7af42c7a.tar.gz
craftbukkit-8447e4f3edbd76a07b53da249d11a1ce7af42c7a.tar.lz
craftbukkit-8447e4f3edbd76a07b53da249d11a1ce7af42c7a.tar.xz
craftbukkit-8447e4f3edbd76a07b53da249d11a1ce7af42c7a.zip
SPIGOT-1659: Fix a mistake in ChunkProviderServer that sometimes caused recursive chunk loads
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/ChunkProviderServer.patch16
1 files changed, 9 insertions, 7 deletions
diff --git a/nms-patches/ChunkProviderServer.patch b/nms-patches/ChunkProviderServer.patch
index 6c5d4e25..cb45aa3b 100644
--- a/nms-patches/ChunkProviderServer.patch
+++ b/nms-patches/ChunkProviderServer.patch
@@ -98,7 +98,7 @@
return chunk;
}
-@@ -61,20 +86,66 @@
+@@ -61,20 +86,67 @@
Chunk chunk = this.getLoadedChunkAt(i, j);
if (chunk == null) {
@@ -127,6 +127,7 @@
}
public Chunk getChunkAt(int i, int j) {
+- Chunk chunk = this.getOrLoadChunkAt(i, j);
+ return getChunkAt(i, j, null);
+ }
+
@@ -160,13 +161,14 @@
+ }
+
+ public Chunk originalGetChunkAt(int i, int j) {
- Chunk chunk = this.getOrLoadChunkAt(i, j);
++ this.unloadQueue.remove(i, j);
++ Chunk chunk = this.chunks.get(LongHash.toLong(i, j));
+ boolean newChunk = false;
+ // CraftBukkit end
if (chunk == null) {
long k = ChunkCoordIntPair.a(i, j);
-@@ -92,11 +163,38 @@
+@@ -92,11 +164,38 @@
crashreportsystemdetails.a("Generator", (Object) this.chunkGenerator);
throw new ReportedException(crashreport);
}
@@ -207,7 +209,7 @@
chunk.loadNearby(this, this.chunkGenerator);
}
-@@ -142,10 +240,12 @@
+@@ -142,10 +241,12 @@
public boolean a(boolean flag) {
int i = 0;
@@ -223,7 +225,7 @@
if (flag) {
this.saveChunkNOP(chunk);
-@@ -170,22 +270,43 @@
+@@ -170,22 +271,43 @@
public boolean unloadChunks() {
if (!this.world.savingDisabled) {
@@ -274,7 +276,7 @@
this.chunkLoader.a();
}
-@@ -198,7 +319,8 @@
+@@ -198,7 +320,8 @@
}
public String getName() {
@@ -284,7 +286,7 @@
}
public List<BiomeBase.BiomeMeta> a(EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
-@@ -210,10 +332,11 @@
+@@ -210,10 +333,11 @@
}
public int g() {