From dbb5e6e3cd35ca82efb39a44fcf6542733d2bc00 Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Thu, 26 Jun 2014 13:05:08 -0500 Subject: Update CraftBukkit to Minecraft 1.7.10 --- src/main/java/net/minecraft/server/Entity.java | 114 ++++++++++++------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'src/main/java/net/minecraft/server/Entity.java') diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 7b975767..09c9c8ee 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -45,7 +45,7 @@ public abstract class Entity { public boolean k; public Entity passenger; public Entity vehicle; - public boolean n; + public boolean attachedToPlayer; public World world; public double lastX; public double lastY; @@ -238,10 +238,10 @@ public abstract class Entity { } public void h() { - this.B(); + this.C(); } - public void B() { + public void C() { this.world.methodProfiler.a("entityBaseTick"); if (this.vehicle != null && this.vehicle.dead) { this.vehicle = null; @@ -259,12 +259,12 @@ public abstract class Entity { this.world.methodProfiler.a("portal"); MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer(); - i = this.C(); + i = this.D(); if (this.an) { if (true || minecraftserver.getAllowNether()) { // CraftBukkit if (this.vehicle == null && this.ao++ >= i) { this.ao = i; - this.portalCooldown = this.ah(); + this.portalCooldown = this.ai(); byte b0; if (this.world.worldProvider.dimension == -1) { @@ -295,7 +295,7 @@ public abstract class Entity { this.world.methodProfiler.b(); } - if (this.isSprinting() && !this.L()) { + if (this.isSprinting() && !this.M()) { int j = MathHelper.floor(this.locX); i = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height); @@ -303,11 +303,11 @@ public abstract class Entity { Block block = this.world.getType(j, i, k); if (block.getMaterial() != Material.AIR) { - this.world.addParticle("blockcrack_" + Block.b(block) + "_" + this.world.getData(j, i, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, -this.motX * 4.0D, 1.5D, -this.motZ * 4.0D); + this.world.addParticle("blockcrack_" + Block.getId(block) + "_" + this.world.getData(j, i, k), this.locX + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, this.boundingBox.b + 0.1D, this.locZ + ((double) this.random.nextFloat() - 0.5D) * (double) this.width, -this.motX * 4.0D, 1.5D, -this.motZ * 4.0D); } } - this.M(); + this.N(); if (this.world.isStatic) { this.fireTicks = 0; } else if (this.fireTicks > 0) { @@ -325,13 +325,13 @@ public abstract class Entity { } } - if (this.O()) { - this.D(); + if (this.P()) { + this.E(); this.fallDistance *= 0.5F; } if (this.locY < -64.0D) { - this.F(); + this.G(); } if (!this.world.isStatic) { @@ -342,11 +342,11 @@ public abstract class Entity { this.world.methodProfiler.b(); } - public int C() { + public int D() { return 0; } - protected void D() { + protected void E() { if (!this.fireProof) { this.damageEntity(DamageSource.LAVA, 4); @@ -388,7 +388,7 @@ public abstract class Entity { this.fireTicks = 0; } - protected void F() { + protected void G() { this.die(); } @@ -403,7 +403,7 @@ public abstract class Entity { // CraftBukkit start - Don't do anything if we aren't moving // We need to do this regardless of whether or not we are moving thanks to portals try { - this.H(); + this.I(); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision"); @@ -666,14 +666,14 @@ public abstract class Entity { this.Q = (float) ((double) this.Q + (double) MathHelper.sqrt(d10 * d10 + d11 * d11 + d12 * d12) * 0.6D); if (this.Q > (float) this.d && block.getMaterial() != Material.AIR) { this.d = (int) this.Q + 1; - if (this.L()) { + if (this.M()) { float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.35F; if (f > 1.0F) { f = 1.0F; } - this.makeSound(this.G(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); + this.makeSound(this.H(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); } this.a(l, k, i1, block); @@ -684,7 +684,7 @@ public abstract class Entity { // CraftBukkit start - Move to the top of the method /* try { - this.H(); + this.I(); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Checking entity block collision"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision"); @@ -694,7 +694,7 @@ public abstract class Entity { } */ // CraftBukkit end - boolean flag2 = this.K(); + boolean flag2 = this.L(); if (this.world.e(this.boundingBox.shrink(0.001D, 0.001D, 0.001D))) { this.burn(1); @@ -726,11 +726,11 @@ public abstract class Entity { } } - protected String G() { + protected String H() { return "game.neutral.swim"; } - protected void H() { + protected void I() { int i = MathHelper.floor(this.boundingBox.a + 0.001D); int j = MathHelper.floor(this.boundingBox.b + 0.001D); int k = MathHelper.floor(this.boundingBox.c + 0.001D); @@ -789,7 +789,7 @@ public abstract class Entity { } } - public AxisAlignedBB I() { + public AxisAlignedBB J() { return null; } @@ -809,15 +809,15 @@ public abstract class Entity { } } - public boolean K() { + public boolean L() { return this.inWater || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ)); } - public boolean L() { + public boolean M() { return this.inWater; } - public boolean M() { + public boolean N() { if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) { if (!this.inWater && !this.justCreated) { float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F; @@ -826,7 +826,7 @@ public abstract class Entity { f = 1.0F; } - this.makeSound(this.N(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); + this.makeSound(this.O(), f, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F); float f1 = (float) MathHelper.floor(this.boundingBox.b); int i; @@ -856,7 +856,7 @@ public abstract class Entity { return this.inWater; } - protected String N() { + protected String O() { return "game.neutral.swim.splash"; } @@ -881,7 +881,7 @@ public abstract class Entity { return 0.0F; } - public boolean O() { + public boolean P() { return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA); } @@ -1030,7 +1030,7 @@ public abstract class Entity { this.al = true; } - protected void P() { + protected void Q() { this.velocityChanged = true; } @@ -1038,23 +1038,23 @@ public abstract class Entity { if (this.isInvulnerable()) { return false; } else { - this.P(); + this.Q(); return false; } } - public boolean Q() { + public boolean R() { return false; } - public boolean R() { + public boolean S() { return false; } public void b(Entity entity, int i) {} public boolean c(NBTTagCompound nbttagcompound) { - String s = this.V(); + String s = this.W(); if (!this.dead && s != null) { nbttagcompound.setString("id", s); @@ -1066,7 +1066,7 @@ public abstract class Entity { } public boolean d(NBTTagCompound nbttagcompound) { - String s = this.V(); + String s = this.W(); if (!this.dead && s != null && this.passenger == null) { nbttagcompound.setString("id", s); @@ -1167,7 +1167,7 @@ public abstract class Entity { this.setPosition(this.locX, this.locY, this.locZ); this.b(this.yaw, this.pitch); this.a(nbttagcompound); - if (this.U()) { + if (this.V()) { this.setPosition(this.locX, this.locY, this.locZ); } @@ -1231,11 +1231,11 @@ public abstract class Entity { } } - protected boolean U() { + protected boolean V() { return true; } - protected final String V() { + protected final String W() { return EntityTypes.b(this); } @@ -1243,7 +1243,7 @@ public abstract class Entity { protected abstract void b(NBTTagCompound nbttagcompound); - public void W() {} + public void X() {} protected NBTTagList a(double... adouble) { NBTTagList nbttaglist = new NBTTagList(); @@ -1329,7 +1329,7 @@ public abstract class Entity { return null; } - public void aa() { + public void ab() { if (this.vehicle.dead) { this.vehicle = null; } else { @@ -1338,7 +1338,7 @@ public abstract class Entity { this.motZ = 0.0D; this.h(); if (this.vehicle != null) { - this.vehicle.ab(); + this.vehicle.ac(); this.h += (double) (this.vehicle.yaw - this.vehicle.lastYaw); for (this.g += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.h >= 180.0D; this.h -= 360.0D) { @@ -1383,17 +1383,17 @@ public abstract class Entity { } } - public void ab() { + public void ac() { if (this.passenger != null) { - this.passenger.setPosition(this.locX, this.locY + this.ad() + this.passenger.ac(), this.locZ); + this.passenger.setPosition(this.locX, this.locY + this.ad() + this.passenger.ad(), this.locZ); } } - public double ac() { + public double ad() { return (double) this.height; } - public double ad() { + public double ae() { return (double) this.length * 0.75D; } @@ -1487,17 +1487,17 @@ public abstract class Entity { } } - public float ae() { + public float af() { return 0.1F; } - public Vec3D af() { + public Vec3D ag() { return null; } - public void ag() { + public void ah() { if (this.portalCooldown > 0) { - this.portalCooldown = this.ah(); + this.portalCooldown = this.ai(); } else { double d0 = this.lastX - this.locX; double d1 = this.lastZ - this.locZ; @@ -1510,7 +1510,7 @@ public abstract class Entity { } } - public int ah() { + public int ai() { return 300; } @@ -1526,7 +1526,7 @@ public abstract class Entity { return !this.fireProof && (this.fireTicks > 0 || flag && this.g(0)); } - public boolean al() { + public boolean am() { return this.vehicle != null; } @@ -1706,7 +1706,7 @@ public abstract class Entity { } } - public void ar() { + public void as() { this.I = true; this.fallDistance = 0.0F; } @@ -1721,7 +1721,7 @@ public abstract class Entity { return LocaleI18n.get("entity." + s + ".name"); } - public Entity[] as() { + public Entity[] at() { return null; } @@ -1733,7 +1733,7 @@ public abstract class Entity { return 0.0F; } - public boolean au() { + public boolean av() { return true; } @@ -1855,15 +1855,15 @@ public abstract class Entity { return true; } - public int aw() { + public int ax() { return 3; } - public int ax() { + public int ay() { return this.aq; } - public boolean ay() { + public boolean az() { return false; } @@ -1880,7 +1880,7 @@ public abstract class Entity { return this.uniqueID; } - public boolean aB() { + public boolean aC() { return true; } -- cgit v1.2.3