summaryrefslogtreecommitdiffstats
path: root/nms-patches/PlayerChunk.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-05-10 21:47:39 +1000
committermd_5 <git@md-5.net>2016-05-10 21:47:39 +1000
commitc5e9a169fa564f3b8119b6666f8df59d5a9b45c3 (patch)
tree9f3b1ce732f0082b71512b1dddb7abb35526226e /nms-patches/PlayerChunk.patch
parent4cb32587ac1ff543b2efa9498f8d0d358cb90c12 (diff)
downloadcraftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.gz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.lz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.tar.xz
craftbukkit-c5e9a169fa564f3b8119b6666f8df59d5a9b45c3.zip
Minecraft 1.9.4
Diffstat (limited to 'nms-patches/PlayerChunk.patch')
-rw-r--r--nms-patches/PlayerChunk.patch21
1 files changed, 9 insertions, 12 deletions
diff --git a/nms-patches/PlayerChunk.patch b/nms-patches/PlayerChunk.patch
index 7354d05c..b4387dda 100644
--- a/nms-patches/PlayerChunk.patch
+++ b/nms-patches/PlayerChunk.patch
@@ -1,15 +1,12 @@
--- a/net/minecraft/server/PlayerChunk.java
+++ b/net/minecraft/server/PlayerChunk.java
-@@ -4,35 +4,50 @@
- import com.google.common.collect.Iterables;
- import com.google.common.collect.Lists;
- import java.util.ArrayList;
-+import java.util.HashMap;
- import java.util.Iterator;
- import java.util.List;
+@@ -8,32 +8,48 @@
+ import javax.annotation.Nullable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
++// CraftBukkit Start
+import org.bukkit.craftbukkit.chunkio.ChunkIOExecutor;
++// CraftBukkit end
public class PlayerChunk {
@@ -19,6 +16,7 @@
+ public final List<EntityPlayer> c = Lists.newArrayList(); // CraftBukkit - public
private final ChunkCoordIntPair location;
private final short[] dirtyBlocks = new short[64];
+ @Nullable
- private Chunk chunk;
+ public Chunk chunk; // CraftBukkit - public
private int dirtyCount;
@@ -51,11 +49,11 @@
}
- public void a(EntityPlayer entityplayer) {
-+ public void a(final EntityPlayer entityplayer) { // CraftBukkit - added final to argument
++ public void a(final EntityPlayer entityplayer) { // CraftBukkit - added final to argument
if (this.c.contains(entityplayer)) {
PlayerChunk.a.debug("Failed to add player. {} already is in chunk {}, {}", new Object[] { entityplayer, Integer.valueOf(this.location.x), Integer.valueOf(this.location.z)});
} else {
-@@ -41,15 +56,32 @@
+@@ -42,15 +58,32 @@
}
this.c.add(entityplayer);
@@ -64,8 +62,7 @@
+ // this.sendChunk(entityplayer);
+ // }
if (this.done) {
-- this.sendChunk(entityplayer);
-+ sendChunk(entityplayer);
+ this.sendChunk(entityplayer);
}
+ // CraftBukkit end
@@ -89,7 +86,7 @@
if (this.done) {
entityplayer.playerConnection.sendPacket(new PacketPlayOutUnloadChunk(this.location.x, this.location.z));
}
-@@ -66,11 +98,18 @@
+@@ -67,11 +100,18 @@
if (this.chunk != null) {
return true;
} else {