diff --git a/nms-patches/PlayerList.patch b/nms-patches/PlayerList.patch index eeb0f68dbf..9c1076e60c 100644 --- a/nms-patches/PlayerList.patch +++ b/nms-patches/PlayerList.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/PlayerList.java 2015-02-26 22:40:23.023608135 +0000 -+++ src/main/java/net/minecraft/server/PlayerList.java 2015-02-26 22:40:23.027608135 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/PlayerList.java 2015-03-08 10:28:09.527576065 +0000 ++++ src/main/java/net/minecraft/server/PlayerList.java 2015-03-08 10:28:09.531576065 +0000 @@ -18,6 +18,26 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -367,7 +367,7 @@ entityplayer.dimension = i; Object object; -@@ -355,80 +509,267 @@ +@@ -355,80 +509,268 @@ } EntityPlayer entityplayer1 = new EntityPlayer(this.server, this.server.getWorldServer(entityplayer.dimension), entityplayer.getProfile(), (PlayerInteractManager) object); @@ -441,6 +441,7 @@ + // CraftBukkit start + byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId()); + // Force the client to refresh their chunk cache ++ entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn((byte) (actualDimension >= 0 ? -1 : 0), worldserver.getDifficulty(), worldserver.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode())); + entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(actualDimension, worldserver.getDifficulty(), worldserver.getWorldData().getType(), entityplayer1.playerInteractManager.getGameMode())); + entityplayer1.spawnIn(worldserver); + entityplayer1.dead = false; @@ -673,7 +674,7 @@ if (entity.dimension == -1) { d0 = MathHelper.a(d0 / d2, worldserver1.getWorldBorder().b() + 16.0D, worldserver1.getWorldBorder().d() - 16.0D); d1 = MathHelper.a(d1 / d2, worldserver1.getWorldBorder().c() + 16.0D, worldserver1.getWorldBorder().e() - 16.0D); -@@ -447,6 +788,8 @@ +@@ -447,6 +789,8 @@ BlockPosition blockposition; if (i == 1) { @@ -682,7 +683,7 @@ blockposition = worldserver1.getSpawn(); } else { blockposition = worldserver1.getDimensionSpawn(); -@@ -460,15 +803,26 @@ +@@ -460,15 +804,26 @@ worldserver.entityJoinedWorld(entity, false); } } @@ -711,7 +712,7 @@ worldserver1.addEntity(entity); worldserver1.entityJoinedWorld(entity, false); } -@@ -477,6 +831,7 @@ +@@ -477,6 +832,7 @@ } entity.spawnIn(worldserver1); @@ -719,7 +720,7 @@ } public void tick() { -@@ -494,6 +849,15 @@ +@@ -494,6 +850,15 @@ } @@ -735,7 +736,7 @@ public void a(Packet packet, int i) { for (int j = 0; j < this.players.size(); ++j) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(j); -@@ -589,10 +953,24 @@ +@@ -589,10 +954,24 @@ public void addOp(GameProfile gameprofile) { this.operators.add(new OpListEntry(gameprofile, this.server.p())); @@ -760,7 +761,7 @@ } public boolean isWhitelisted(GameProfile gameprofile) { -@@ -600,7 +978,7 @@ +@@ -600,7 +979,7 @@ } public boolean isOp(GameProfile gameprofile) { @@ -769,7 +770,7 @@ } public EntityPlayer getPlayer(String s) { -@@ -627,6 +1005,12 @@ +@@ -627,6 +1006,12 @@ for (int j = 0; j < this.players.size(); ++j) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(j); @@ -782,7 +783,7 @@ if (entityplayer != entityhuman && entityplayer.dimension == i) { double d4 = d0 - entityplayer.locX; double d5 = d1 - entityplayer.locY; -@@ -674,21 +1058,26 @@ +@@ -674,21 +1059,26 @@ public void reloadWhitelist() {} public void b(EntityPlayer entityplayer, WorldServer worldserver) { @@ -814,7 +815,7 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); } -@@ -701,7 +1090,7 @@ +@@ -701,7 +1091,7 @@ } public String[] getSeenPlayers() { @@ -823,7 +824,7 @@ } public boolean getHasWhitelist() { -@@ -751,16 +1140,26 @@ +@@ -751,16 +1141,26 @@ public void u() { for (int i = 0; i < this.players.size(); ++i) { @@ -852,7 +853,7 @@ } public void sendMessage(IChatBaseComponent ichatbasecomponent) { -@@ -797,8 +1196,10 @@ +@@ -797,8 +1197,10 @@ WorldServer[] aworldserver = this.server.worldServer; int j = aworldserver.length;