Minecraft 1.9.4

This commit is contained in:
md_5
2016-05-10 21:47:39 +10:00
parent 4cb32587ac
commit c5e9a169fa
236 changed files with 1471 additions and 1822 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/server/PlayerChunkMap.java
+++ b/net/minecraft/server/PlayerChunkMap.java
@@ -12,6 +12,10 @@
import java.util.List;
@@ -15,6 +15,10 @@
import java.util.Set;
import javax.annotation.Nullable;
+// CraftBukkit start
+import java.util.LinkedList;
@@ -11,7 +11,7 @@
public class PlayerChunkMap {
private static final Predicate<EntityPlayer> a = new Predicate() {
@@ -43,6 +47,7 @@
@@ -46,6 +50,7 @@
private long k;
private boolean l = true;
private boolean m = true;
@@ -19,13 +19,13 @@
public PlayerChunkMap(WorldServer worldserver) {
this.world = worldserver;
@@ -227,6 +232,16 @@
@@ -231,6 +236,16 @@
return playerchunk;
}
+ // CraftBukkit start - add method
+ public final boolean isChunkInUse(int x, int z) {
+ PlayerChunk pi = b(x, z);
+ PlayerChunk pi = getChunk(x, z);
+ if (pi != null) {
+ return (pi.c.size() > 0);
+ }
@@ -36,7 +36,7 @@
public void flagDirty(BlockPosition blockposition) {
int i = blockposition.getX() >> 4;
int j = blockposition.getZ() >> 4;
@@ -245,12 +260,22 @@
@@ -249,12 +264,22 @@
entityplayer.d = entityplayer.locX;
entityplayer.e = entityplayer.locZ;
@@ -60,7 +60,7 @@
this.managedPlayers.add(entityplayer);
this.e();
}
@@ -294,11 +319,14 @@
@@ -298,11 +323,14 @@
int j1 = i - k;
int k1 = j - l;
@@ -76,7 +76,7 @@
}
if (!this.a(l1 - j1, i2 - k1, i, j, i1)) {
@@ -314,6 +342,13 @@
@@ -318,6 +346,13 @@
entityplayer.d = entityplayer.locX;
entityplayer.e = entityplayer.locZ;
this.e();
@@ -90,9 +90,9 @@
}
}
}
@@ -393,4 +428,47 @@
this.h.remove(playerchunk);
this.getWorld().getChunkProviderServer().queueUnload(chunkcoordintpair.x, chunkcoordintpair.z);
@@ -402,4 +437,47 @@
}
}
+
+ // CraftBukkit start - Sorter to load nearby chunks first