Update to Minecraft 1.11.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2016-12-21 07:00:00 +11:00
parent 74902a47aa
commit f9a809b2ba
29 changed files with 368 additions and 334 deletions

View File

@@ -116,7 +116,7 @@
playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
this.b(entityplayer, worldserver);
if (!this.server.getResourcePack().isEmpty()) {
@@ -159,6 +204,8 @@
@@ -151,6 +196,8 @@
}
entityplayer.syncInventory();
@@ -125,7 +125,7 @@
}
public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
@@ -191,26 +238,27 @@
@@ -183,26 +230,27 @@
}
public void setPlayerFileData(WorldServer[] aworldserver) {
@@ -158,16 +158,16 @@
}
public void b(WorldBorder worldborder, double d0) {}
@@ -235,7 +283,7 @@
}
@@ -228,7 +276,7 @@
@Nullable
public NBTTagCompound a(EntityPlayer entityplayer) {
- NBTTagCompound nbttagcompound = this.server.worldServer[0].getWorldData().h();
+ NBTTagCompound nbttagcompound = this.server.worlds.get(0).getWorldData().h(); // CraftBukkit
NBTTagCompound nbttagcompound1;
if (entityplayer.getName().equals(this.server.Q()) && nbttagcompound != null) {
@@ -259,28 +307,72 @@
@@ -252,28 +300,72 @@
}
@@ -246,7 +246,7 @@
this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getVehicle();
@@ -312,13 +404,61 @@
@@ -305,13 +397,61 @@
this.o.remove(uuid);
}
@@ -311,7 +311,7 @@
GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile);
s = "You are banned from this server!\nReason: " + gameprofilebanentry.getReason();
@@ -326,10 +466,12 @@
@@ -319,10 +459,12 @@
s = s + "\nYour ban will be removed on " + PlayerList.g.format(gameprofilebanentry.getExpires());
}
@@ -327,7 +327,7 @@
IpBanEntry ipbanentry = this.l.get(socketaddress);
s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason();
@@ -337,13 +479,25 @@
@@ -330,13 +472,25 @@
s = s + "\nYour ban will be removed on " + PlayerList.g.format(ipbanentry.getExpires());
}
@@ -356,7 +356,7 @@
UUID uuid = EntityHuman.a(gameprofile);
ArrayList arraylist = Lists.newArrayList();
@@ -378,17 +532,26 @@
@@ -371,17 +525,26 @@
}
return new EntityPlayer(this.server, this.server.getWorldServer(0), gameprofile, (PlayerInteractManager) object);
@@ -384,7 +384,7 @@
entityplayer.dimension = i;
Object object;
@@ -399,6 +562,11 @@
@@ -392,6 +555,11 @@
}
EntityPlayer entityplayer1 = new EntityPlayer(this.server, this.server.getWorldServer(entityplayer.dimension), entityplayer.getProfile(), (PlayerInteractManager) object);
@@ -396,7 +396,7 @@
entityplayer1.playerConnection = entityplayer.playerConnection;
entityplayer1.copyTo(entityplayer, flag);
@@ -413,43 +581,157 @@
@@ -406,43 +574,157 @@
entityplayer1.a(s);
}
@@ -427,13 +427,13 @@
+ entityplayer1.setRespawnPosition(null, true);
+ entityplayer1.playerConnection.sendPacket(new PacketPlayOutGameStateChange(0, 0.0F));
+ }
}
+ }
+
+ if (location == null) {
+ cworld = (CraftWorld) this.server.server.getWorlds().get(0);
+ blockposition = cworld.getHandle().getSpawn();
+ location = new Location(cworld, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.1F), (double) ((float) blockposition.getZ() + 0.5F));
+ }
}
+
+ Player respawnPlayer = cserver.getPlayer(entityplayer1);
+ PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
@@ -571,7 +571,7 @@
public void f(EntityPlayer entityplayer) {
GameProfile gameprofile = entityplayer.getProfile();
int i = this.isOp(gameprofile) ? this.operators.a(gameprofile) : 0;
@@ -488,12 +770,111 @@
@@ -481,12 +763,111 @@
}
public void changeWorld(Entity entity, int i, WorldServer worldserver, WorldServer worldserver1) {
@@ -593,12 +593,12 @@
+ double d1 = enter.getZ();
+ double d2 = 8.0D;
+ /*
double d0 = entity.locX;
double d1 = entity.locZ;
double d2 = 8.0D;
float f = entity.yaw;
worldserver.methodProfiler.a("moving");
+ double d0 = entity.locX;
+ double d1 = entity.locZ;
+ double d2 = 8.0D;
+ float f = entity.yaw;
+
+ worldserver.methodProfiler.a("moving");
+ */
+ if (worldserver1.dimension == -1) {
+ d0 = MathHelper.a(d0 / d2, worldserver1.getWorldBorder().b()+ 16.0D, worldserver1.getWorldBorder().d() - 16.0D);
@@ -668,12 +668,12 @@
+ int i = worldserver.dimension;
+
+ /*
+ double d0 = entity.locX;
+ double d1 = entity.locZ;
+ double d2 = 8.0D;
+ float f = entity.yaw;
+
+ worldserver.methodProfiler.a("moving");
double d0 = entity.locX;
double d1 = entity.locZ;
double d2 = 8.0D;
float f = entity.yaw;
worldserver.methodProfiler.a("moving");
+ */
+ entity.setPositionRotation(exit.getX(), exit.getY(), exit.getZ(), exit.getYaw(), exit.getPitch());
+ if (entity.isAlive()) {
@@ -683,7 +683,7 @@
if (entity.dimension == -1) {
d0 = MathHelper.a(d0 / 8.0D, worldserver1.getWorldBorder().b() + 16.0D, worldserver1.getWorldBorder().d() - 16.0D);
d1 = MathHelper.a(d1 / 8.0D, worldserver1.getWorldBorder().c() + 16.0D, worldserver1.getWorldBorder().e() - 16.0D);
@@ -512,6 +893,8 @@
@@ -505,6 +886,8 @@
BlockPosition blockposition;
if (i == 1) {
@@ -692,7 +692,7 @@
blockposition = worldserver1.getSpawn();
} else {
blockposition = worldserver1.getDimensionSpawn();
@@ -525,16 +908,27 @@
@@ -518,16 +901,27 @@
worldserver.entityJoinedWorld(entity, false);
}
}
@@ -723,7 +723,7 @@
worldserver1.entityJoinedWorld(entity, false);
}
@@ -542,11 +936,23 @@
@@ -535,11 +929,23 @@
}
entity.spawnIn(worldserver1);
@@ -748,7 +748,7 @@
this.u = 0;
}
@@ -559,6 +965,25 @@
@@ -552,6 +958,25 @@
}
@@ -774,7 +774,7 @@
public void a(Packet<?> packet, int i) {
for (int j = 0; j < this.players.size(); ++j) {
EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
@@ -657,11 +1082,23 @@
@@ -650,11 +1075,23 @@
this.operators.add(new OpListEntry(gameprofile, this.server.q(), this.operators.b(gameprofile)));
this.b(this.a(gameprofile.getId()), i);
@@ -798,7 +798,7 @@
}
private void b(EntityPlayer entityplayer, int i) {
@@ -686,7 +1123,7 @@
@@ -679,7 +1116,7 @@
}
public boolean isOp(GameProfile gameprofile) {
@@ -807,7 +807,7 @@
}
@Nullable
@@ -710,6 +1147,12 @@
@@ -703,6 +1140,12 @@
for (int j = 0; j < this.players.size(); ++j) {
EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
@@ -820,7 +820,7 @@
if (entityplayer != entityhuman && entityplayer.dimension == i) {
double d4 = d0 - entityplayer.locX;
double d5 = d1 - entityplayer.locY;
@@ -757,7 +1200,7 @@
@@ -750,7 +1193,7 @@
public void reloadWhitelist() {}
public void b(EntityPlayer entityplayer, WorldServer worldserver) {
@@ -829,7 +829,7 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutWorldBorder(worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction.INITIALIZE));
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean("doDaylightCycle")));
@@ -765,16 +1208,21 @@
@@ -758,16 +1201,21 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition));
if (worldserver.W()) {
@@ -855,7 +855,7 @@
entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
}
@@ -787,7 +1235,7 @@
@@ -780,7 +1228,7 @@
}
public String[] getSeenPlayers() {
@@ -864,7 +864,7 @@
}
public boolean getHasWhitelist() {
@@ -836,17 +1284,29 @@
@@ -829,17 +1277,29 @@
}
public void u() {
@@ -875,17 +875,17 @@
+ player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
}
+ // CraftBukkit end
+
+ }
}
+ // CraftBukkit start
+ public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
+ for (IChatBaseComponent component : iChatBaseComponents) {
+ sendMessage(component, true);
+ }
}
+ }
+ // CraftBukkit end
+
public void sendMessage(IChatBaseComponent ichatbasecomponent, boolean flag) {
this.server.sendMessage(ichatbasecomponent);
int i = flag ? 1 : 0;
@@ -897,7 +897,7 @@
}
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
@@ -883,8 +1343,10 @@
@@ -876,8 +1336,10 @@
WorldServer[] aworldserver = this.server.worldServer;
int j = aworldserver.length;