@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user