From 14d69f15139058170cba855c99af059bc62b3b85 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 11 Dec 2014 00:40:25 +0000 Subject: [PATCH] Remove old dev comments --- nms-patches/Entity.patch | 40 +++++++++---------- .../command/VanillaCommandWrapper.java | 10 ----- .../scoreboard/CraftScoreboard.java | 4 +- 3 files changed, 21 insertions(+), 33 deletions(-) diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch index 2e5bc544a4..610ffd4718 100644 --- a/nms-patches/Entity.patch +++ b/nms-patches/Entity.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/Entity.java 2014-12-02 17:53:23.077821724 +0000 -+++ src/main/java/net/minecraft/server/Entity.java 2014-12-02 17:52:52.025822413 +0000 +--- ../work/decompile-8eb82bde/net/minecraft/server/Entity.java 2014-12-11 00:40:13.568254452 +0000 ++++ src/main/java/net/minecraft/server/Entity.java 2014-12-11 00:38:28.556255592 +0000 @@ -6,8 +6,40 @@ import java.util.UUID; import java.util.concurrent.Callable; @@ -144,7 +144,7 @@ this.world.methodProfiler.a("move"); double d3 = this.locX; double d4 = this.locY; -@@ -520,6 +618,28 @@ +@@ -520,6 +618,26 @@ block.a(this.world, this); } @@ -153,8 +153,6 @@ + Vehicle vehicle = (Vehicle) this.getBukkitEntity(); + org.bukkit.block.Block bl = this.world.getWorld().getBlockAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY - (double) this.getHeadHeight()), MathHelper.floor(this.locZ)); + -+ // PAIL: using local vars may break between updates, name them above? -+ + if (d6 > d0) { + bl = bl.getRelative(BlockFace.EAST); + } else if (d6 < d0) { @@ -173,7 +171,7 @@ if (this.r_() && !flag && this.vehicle == null) { double d21 = this.locX - d3; double d22 = this.locY - d4; -@@ -530,7 +650,7 @@ +@@ -530,7 +648,7 @@ } if (block != null && this.onGround) { @@ -182,7 +180,7 @@ } this.M = (float) ((double) this.M + (double) MathHelper.sqrt(d21 * d21 + d23 * d23) * 0.6D); -@@ -548,9 +668,12 @@ +@@ -548,9 +666,12 @@ } this.a(blockposition, block); @@ -195,7 +193,7 @@ try { this.checkBlockCollisions(); } catch (Throwable throwable) { -@@ -560,6 +683,8 @@ +@@ -560,6 +681,8 @@ this.appendEntityCrashDetails(crashreportsystemdetails); throw new ReportedException(crashreport); } @@ -204,7 +202,7 @@ boolean flag2 = this.U(); -@@ -567,7 +692,16 @@ +@@ -567,7 +690,16 @@ this.burn(1); if (!flag2) { ++this.fireTicks; @@ -222,7 +220,7 @@ this.setOnFire(8); } } -@@ -673,7 +807,7 @@ +@@ -673,7 +805,7 @@ return null; } @@ -231,7 +229,7 @@ if (!this.fireProof) { this.damageEntity(DamageSource.FIRE, (float) i); } -@@ -823,6 +957,13 @@ +@@ -823,6 +955,13 @@ } public void spawnIn(World world) { @@ -245,7 +243,7 @@ this.world = world; } -@@ -1015,6 +1156,18 @@ +@@ -1015,6 +1154,18 @@ try { nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ})); nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ})); @@ -264,7 +262,7 @@ nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch})); nbttagcompound.setFloat("FallDistance", this.fallDistance); nbttagcompound.setShort("Fire", (short) this.fireTicks); -@@ -1025,6 +1178,11 @@ +@@ -1025,6 +1176,11 @@ nbttagcompound.setInt("PortalCooldown", this.portalCooldown); nbttagcompound.setLong("UUIDMost", this.getUniqueID().getMostSignificantBits()); nbttagcompound.setLong("UUIDLeast", this.getUniqueID().getLeastSignificantBits()); @@ -276,7 +274,7 @@ if (this.getCustomName() != null && this.getCustomName().length() > 0) { nbttagcompound.setString("CustomName", this.getCustomName()); nbttagcompound.setBoolean("CustomNameVisible", this.getCustomNameVisible()); -@@ -1062,6 +1220,7 @@ +@@ -1062,6 +1218,7 @@ this.motX = nbttaglist1.d(0); this.motY = nbttaglist1.d(1); this.motZ = nbttaglist1.d(2); @@ -284,7 +282,7 @@ if (Math.abs(this.motX) > 10.0D) { this.motX = 0.0D; } -@@ -1073,6 +1232,7 @@ +@@ -1073,6 +1230,7 @@ if (Math.abs(this.motZ) > 10.0D) { this.motZ = 0.0D; } @@ -292,7 +290,7 @@ this.lastX = this.P = this.locX = nbttaglist.d(0); this.lastY = this.Q = this.locY = nbttaglist.d(1); -@@ -1105,7 +1265,57 @@ +@@ -1105,7 +1263,57 @@ if (this.af()) { this.setPosition(this.locX, this.locY, this.locZ); } @@ -350,7 +348,7 @@ } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1167,6 +1377,12 @@ +@@ -1167,6 +1375,12 @@ public EntityItem a(ItemStack itemstack, float f) { if (itemstack.count != 0 && itemstack.getItem() != null) { @@ -363,7 +361,7 @@ EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack); entityitem.p(); -@@ -1276,16 +1492,76 @@ +@@ -1276,16 +1490,76 @@ } public void mount(Entity entity) { @@ -440,7 +438,7 @@ if (this.vehicle != null) { this.vehicle.passenger = null; } -@@ -1406,10 +1682,50 @@ +@@ -1406,10 +1680,50 @@ } public void onLightningStrike(EntityLightning entitylightning) { @@ -492,7 +490,7 @@ } } -@@ -1546,32 +1862,78 @@ +@@ -1546,32 +1860,78 @@ if (!this.world.isStatic && !this.dead) { this.world.methodProfiler.a("changeDimension"); MinecraftServer minecraftserver = MinecraftServer.getServer(); @@ -576,7 +574,7 @@ } this.dead = true; -@@ -1680,8 +2042,27 @@ +@@ -1680,8 +2040,27 @@ return this.boundingBox; } diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java index 0319bf3b71..a6131d6b68 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java @@ -45,9 +45,6 @@ public final class VanillaCommandWrapper extends VanillaCommand { MinecraftServer.getServer().worldServer = new WorldServer[]{(WorldServer) icommandlistener.getWorld()}; try { vanillaCommand.execute(icommandlistener, args); - // PAIL fake throws - if (false) throw new ExceptionUsage(null, null); - if (false) throw new CommandException(null, null); } catch (ExceptionUsage exceptionusage) { ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[] {new ChatMessage(exceptionusage.getMessage(), exceptionusage.getArgs())}); chatmessage.getChatModifier().setColor(EnumChatFormat.RED); @@ -100,9 +97,6 @@ public final class VanillaCommandWrapper extends VanillaCommand { as[i] = entity.getUniqueID().toString(); vanillaCommand.execute(icommandlistener, as); j++; - // PAIL fake throws - if (false) throw new ExceptionUsage(null, null); - if (false) throw new CommandException(null, null); } catch (ExceptionUsage exceptionusage) { ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[] { new ChatMessage(exceptionusage.getMessage(), exceptionusage.getArgs())}); chatmessage.getChatModifier().setColor(EnumChatFormat.RED); @@ -124,10 +118,6 @@ public final class VanillaCommandWrapper extends VanillaCommand { chatmessage.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage); } - // PAIL start: fix compile error - if (false) throw new ExceptionUsage(null, null); - if (false) throw new CommandException(null, null); - // PAIL end } catch (ExceptionUsage exceptionusage) { ChatMessage chatmessage1 = new ChatMessage("commands.generic.usage", new Object[] { new ChatMessage(exceptionusage.getMessage(), exceptionusage.getArgs()) }); chatmessage1.getChatModifier().setColor(EnumChatFormat.RED); diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java index 62bb8a362b..6fdad6e617 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -98,7 +98,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { Validate.notNull(player, "OfflinePlayer cannot be null"); for (CraftObjective objective : objectives.values()) { - board.resetPlayerScores(player.getName(), objective.getHandle()); // PAIL: check me + board.resetPlayerScores(player.getName(), objective.getHandle()); } } @@ -106,7 +106,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { Validate.notNull(entry, "Entry cannot be null"); for (CraftObjective objective : objectives.values()) { - board.resetPlayerScores(entry, objective.getHandle()); // PAIL: check me + board.resetPlayerScores(entry, objective.getHandle()); } }