summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcexikitin <king@hiberniagaming.net>2012-12-26 14:21:18 -0500
committerTravis Watkins <amaranth@ubuntu.com>2012-12-27 15:16:33 -0600
commit49da990ee331d42bd84141fae60ca9ee503619c3 (patch)
treea3bfa6b8150e56f8b49ad90275ef5da26f73fe2d
parent3a0c5aff0c646b6ae16345da1a168805f0a53cc7 (diff)
downloadcraftbukkit-49da990ee331d42bd84141fae60ca9ee503619c3.tar
craftbukkit-49da990ee331d42bd84141fae60ca9ee503619c3.tar.gz
craftbukkit-49da990ee331d42bd84141fae60ca9ee503619c3.tar.lz
craftbukkit-49da990ee331d42bd84141fae60ca9ee503619c3.tar.xz
craftbukkit-49da990ee331d42bd84141fae60ca9ee503619c3.zip
Never remove players when unloading chunks. Fixes BUKKIT-3129
When unloading chunks we have a check to ensure we do not remove players from the world due to the issues this would cause. However, our check to see if the player is in this chunk is reversed and is in fact entirely wrong. Even if the player isn't currently in this chunk we do not want to remove them as that will still cause the same issues.
-rw-r--r--src/main/java/net/minecraft/server/Chunk.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 9b6d1341..0a177348 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -686,12 +686,10 @@ public class Chunk {
java.util.Iterator<Object> iter = this.entitySlices[i].iterator();
while (iter.hasNext()) {
Entity entity = (Entity) iter.next();
- int cx = Location.locToBlock(entity.locX) >> 4;
- int cz = Location.locToBlock(entity.locZ) >> 4;
// Do not pass along players, as doing so can get them stuck outside of time.
// (which for example disables inventory icon updates and prevents block breaking)
- if (entity instanceof EntityPlayer && (cx != this.x || cz != this.z)) {
+ if (entity instanceof EntityPlayer) {
iter.remove();
}
}