summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-12-06 22:05:58 +1100
committermd_5 <git@md-5.net>2016-12-06 22:05:58 +1100
commit58bff62b2dc68da958f2e90371582a13aa3c9355 (patch)
tree41300355482eacacab4fa200dfbcc44f1f035d62 /nms-patches
parentbfbd868a37b8c02e34965469cde894b3cbe0331a (diff)
downloadcraftbukkit-58bff62b2dc68da958f2e90371582a13aa3c9355.tar
craftbukkit-58bff62b2dc68da958f2e90371582a13aa3c9355.tar.gz
craftbukkit-58bff62b2dc68da958f2e90371582a13aa3c9355.tar.lz
craftbukkit-58bff62b2dc68da958f2e90371582a13aa3c9355.tar.xz
craftbukkit-58bff62b2dc68da958f2e90371582a13aa3c9355.zip
SPIGOT-2891: Remove chunks if first check is false
Minecraft does double checking for synchronous generation, but since we generate chunks asynchronously we are required to check the first condition also in case the chunk was loaded between ticks. We leave the other logic to be cleaned up by the loops below.
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/PlayerChunkMap.patch22
1 files changed, 17 insertions, 5 deletions
diff --git a/nms-patches/PlayerChunkMap.patch b/nms-patches/PlayerChunkMap.patch
index 6ec531c9..37c4c474 100644
--- a/nms-patches/PlayerChunkMap.patch
+++ b/nms-patches/PlayerChunkMap.patch
@@ -19,7 +19,19 @@
public PlayerChunkMap(WorldServer worldserver) {
this.world = worldserver;
-@@ -231,6 +236,16 @@
+@@ -169,7 +174,11 @@
+ break;
+ }
+ }
++ // CraftBukkit start - SPIGOT-2891: remove once chunk has been provided
++ } else {
++ iterator1.remove();
+ }
++ // CraftBukkit end
+ }
+ }
+
+@@ -231,6 +240,16 @@
return playerchunk;
}
@@ -36,7 +48,7 @@
public void flagDirty(BlockPosition blockposition) {
int i = blockposition.getX() >> 4;
int j = blockposition.getZ() >> 4;
-@@ -249,12 +264,22 @@
+@@ -249,12 +268,22 @@
entityplayer.d = entityplayer.locX;
entityplayer.e = entityplayer.locZ;
@@ -60,7 +72,7 @@
this.managedPlayers.add(entityplayer);
this.e();
}
-@@ -298,11 +323,14 @@
+@@ -298,11 +327,14 @@
int j1 = i - k;
int k1 = j - l;
@@ -76,7 +88,7 @@
}
if (!this.a(l1 - j1, i2 - k1, i, j, i1)) {
-@@ -318,6 +346,13 @@
+@@ -318,6 +350,13 @@
entityplayer.d = entityplayer.locX;
entityplayer.e = entityplayer.locZ;
this.e();
@@ -90,7 +102,7 @@
}
}
}
-@@ -402,4 +437,47 @@
+@@ -402,4 +441,47 @@
}
}