From 3dcf159ec1a9233cade738c8d505eaf823a32b6f Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Sun, 13 Apr 2014 04:29:01 -0500 Subject: [PATCH] Fix missed diff and other small things --- src/main/java/net/minecraft/server/EntityEnderDragon.java | 2 +- src/main/java/net/minecraft/server/EntityHuman.java | 6 +++--- .../java/net/minecraft/server/EntityMinecartAbstract.java | 2 +- src/main/java/net/minecraft/server/EntitySlime.java | 2 +- src/main/java/net/minecraft/server/PlayerConnection.java | 2 +- src/main/java/net/minecraft/server/PlayerList.java | 8 ++++---- src/main/java/net/minecraft/server/WorldNBTStorage.java | 6 +++++- .../java/org/bukkit/craftbukkit/CraftOfflinePlayer.java | 2 +- 8 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java index f53b1834e9..dbf30cb8d8 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -135,7 +135,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo d2 = this.locZ + (this.bj - this.locZ) / (double) this.bg; d3 = MathHelper.g(this.bk - (double) this.yaw); this.yaw = (float) ((double) this.yaw + d3 / (double) this.bg); - this.pitch = (float) ((double) this.pitch + (this.bm - (double) this.pitch) / (double) this.bg); + this.pitch = (float) ((double) this.pitch + (this.bl - (double) this.pitch) / (double) this.bg); --this.bg; this.setPosition(d0, d1, d2); this.b(this.yaw, this.pitch); diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index eb4793d95e..b4a0122752 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -78,7 +78,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen ChunkCoordinates chunkcoordinates = world.getSpawn(); this.setPositionRotation((double) chunkcoordinates.x + 0.5D, (double) (chunkcoordinates.y + 1), (double) chunkcoordinates.z + 0.5D, 0.0F, 0.0F); - this.az = 180.0F; + this.aZ = 180.0F; this.maxFireTicks = 20; } @@ -190,7 +190,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } if (d0 < -d3) { - this.bu = this.by = this.locX; + this.bu = this.bx = this.locX; } if (d2 < -d3) { @@ -198,7 +198,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } if (d1 < -d3) { - this.bv = this.bz = this.locY; + this.bv = this.by = this.locY; } this.bx += d0 * 0.25D; diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java index f565028d01..166206cb0e 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -199,7 +199,7 @@ public abstract class EntityMinecartAbstract extends Entity { } if (this.locY < -64.0D) { - this.G(); + this.F(); } int i; diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java index c05d86c61c..f737dd8456 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -146,7 +146,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { } else { this.bc = false; if (this.onGround) { - this.bd = this.bf = 0.0F; + this.bd = this.be = 0.0F; } } } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 946681d399..00d924c11b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -341,7 +341,7 @@ public class PlayerConnection implements PacketPlayInListener { } this.player.i(); - this.player.W = 0.0F; + this.player.V = 0.0F; this.player.setLocation(this.y, this.z, this.q, f2, f3); if (!this.checkMovement) { return; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index 7c01595f83..9a90671071 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -164,7 +164,7 @@ public abstract class PlayerList { } // CraftBukkit - Moved from above, added world - g.info(entityplayer.getName() + "[" + s + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "] " + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")"); + g.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "] " + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")"); } public void a(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { // CraftBukkit - protected -> public @@ -374,7 +374,7 @@ public abstract class PlayerList { s = s + "\nYour ban will be removed on " + h.format(ipbanentry.getExpires()); } - // return s2; + // return s; event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s); } else { // return this.players.size() >= this.maxPlayers ? "The server is full!" : null; @@ -768,7 +768,7 @@ public abstract class PlayerList { */ if (entity.isAlive()) { // entity.setPositionRotation(d0, entity.locY, d1, entity.yaw, entity.pitch) - // worldserver1.s().a(entity, d3, d4, d5, f); + // worldserver1.getTravelAgent().a(entity, d3, d4, d5, f); if (portal) { Vector velocity = entity.getBukkitEntity().getVelocity(); worldserver1.getTravelAgent().adjustExit(entity, exit, velocity); @@ -794,7 +794,7 @@ public abstract class PlayerList { } /* CraftBukkit start - Remove updating of lag to players -- it spams way to much on big servers. - if (this.p < this.players.size()) { + if (this.t < this.players.size()) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(this.p); this.sendAll(new PacketPlayOutPlayerInfo(entityplayer.getName(), true, entityplayer.ping)); diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java index fabc72ba93..93ff8d3bd7 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -208,7 +208,11 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData { // CraftBukkit start if (entityhuman instanceof EntityPlayer) { CraftPlayer player = (CraftPlayer) entityhuman.bukkitEntity; - player.setFirstPlayed(new File(playerDir, entityhuman.getName() + ".dat").lastModified()); + // Only update first played if it is older than the one we have + long modified = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat").lastModified(); + if (modified < player.getFirstPlayed()) { + player.setFirstPlayed(modified); + } } // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java index bd9882226c..237837d763 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -163,7 +163,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa @Override public int hashCode() { int hash = 5; - hash = 97 * hash + (this.getUniqueId() != null ? this.getUniqueId().toString().hashCode() : 0); + hash = 97 * hash + (this.getUniqueId() != null ? this.getUniqueId().hashCode() : 0); return hash; }