summaryrefslogtreecommitdiffstats
path: root/nms-patches/Chunk.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-30 13:09:04 +1000
committermd_5 <git@md-5.net>2018-07-30 13:09:04 +1000
commit98f42923316e468a3b26887a92671a0ed16df073 (patch)
treeb54e263bf6584995b40816e47c6dfe4410302867 /nms-patches/Chunk.patch
parentc3a8de0371ffaad3752a503ba1f7583544a0662c (diff)
downloadcraftbukkit-98f42923316e468a3b26887a92671a0ed16df073.tar
craftbukkit-98f42923316e468a3b26887a92671a0ed16df073.tar.gz
craftbukkit-98f42923316e468a3b26887a92671a0ed16df073.tar.lz
craftbukkit-98f42923316e468a3b26887a92671a0ed16df073.tar.xz
craftbukkit-98f42923316e468a3b26887a92671a0ed16df073.zip
SPIGOT-4190: Move ChunkLoadEvent call
Diffstat (limited to 'nms-patches/Chunk.patch')
-rw-r--r--nms-patches/Chunk.patch26
1 files changed, 22 insertions, 4 deletions
diff --git a/nms-patches/Chunk.patch b/nms-patches/Chunk.patch
index cc5917d3..c98d9aa4 100644
--- a/nms-patches/Chunk.patch
+++ b/nms-patches/Chunk.patch
@@ -118,7 +118,25 @@
}
}
-@@ -735,9 +788,21 @@
+@@ -719,6 +772,17 @@
+ this.world.a((Collection) entityslice);
+ }
+
++ // CraftBukkit start
++ org.bukkit.Server server = this.world.getServer();
++ if (server != null) {
++ /*
++ * If it's a new world, the first few chunks are generated inside
++ * the World constructor. We can't reliably alter that, so we have
++ * no way of creating a CraftWorld/CraftServer at that point.
++ */
++ server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.newChunk));
++ }
++ // CraftBukkit end
+ }
+
+ public void removeEntities() {
+@@ -735,9 +799,21 @@
int i = aentityslice.length;
for (int j = 0; j < i; ++j) {
@@ -142,7 +160,7 @@
}
}
-@@ -799,8 +864,8 @@
+@@ -799,8 +875,8 @@
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
@@ -153,7 +171,7 @@
}
}
}
-@@ -1006,13 +1071,13 @@
+@@ -1006,13 +1082,13 @@
@Nullable
public LongSet b(String s) {
@@ -169,7 +187,7 @@
return new LongOpenHashSet();
})).add(i);
}
-@@ -1061,14 +1126,14 @@
+@@ -1061,14 +1137,14 @@
}
if (this.t instanceof ProtoChunkTickList) {