diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-22 20:39:39 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-22 20:39:39 +0000 |
commit | 9d09e7d0167326d4169f734e4b6d04c54d767507 (patch) | |
tree | 898333912891b9c35a63994242fbd55d5b6ac2c6 /src/main/java/net/minecraft/server/Entity.java | |
parent | 8dc7417a3d5c1af1e6434dc54952cfd5a8e90688 (diff) | |
download | craftbukkit-9d09e7d0167326d4169f734e4b6d04c54d767507.tar craftbukkit-9d09e7d0167326d4169f734e4b6d04c54d767507.tar.gz craftbukkit-9d09e7d0167326d4169f734e4b6d04c54d767507.tar.lz craftbukkit-9d09e7d0167326d4169f734e4b6d04c54d767507.tar.xz craftbukkit-9d09e7d0167326d4169f734e4b6d04c54d767507.zip |
Updated to Minecraft version 1.2.4. Updated version string to 1.2.4-R0.1.
Diffstat (limited to 'src/main/java/net/minecraft/server/Entity.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Entity.java | 71 |
1 files changed, 46 insertions, 25 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index f15827a7..d3739714 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -193,11 +193,11 @@ public abstract class Entity { this.boundingBox.c(d0 - (double) f, d1 - (double) this.height + (double) this.bO, d2 - (double) f, d0 + (double) f, d1 - (double) this.height + (double) this.bO + (double) f1, d2 + (double) f); } - public void G_() { - this.az(); + public void F_() { + this.aA(); } - public void az() { + public void aA() { // MethodProfiler.a("entityBaseTick"); // CraftBukkit - not in production code if (this.vehicle != null && this.vehicle.dead) { this.vehicle = null; @@ -212,7 +212,7 @@ public abstract class Entity { this.lastYaw = this.yaw; int i; - if (this.isSprinting() && !this.aT()) { + if (this.isSprinting() && !this.aU()) { int j = MathHelper.floor(this.locX); int k = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height); @@ -286,13 +286,13 @@ public abstract class Entity { } } - if (this.aU()) { - this.aP(); + if (this.aV()) { + this.aQ(); this.fallDistance *= 0.5F; } if (this.locY < -64.0D) { - this.aH(); + this.aI(); } if (!this.world.isStatic) { @@ -304,7 +304,7 @@ public abstract class Entity { // MethodProfiler.a(); // CraftBukkit - not in production code } - protected void aP() { + protected void aQ() { if (!this.fireProof) { // CraftBukkit start - fallen in lava TODO: this event spams! if (this instanceof EntityLiving) { @@ -354,7 +354,7 @@ public abstract class Entity { this.fireTicks = 0; } - protected void aH() { + protected void aI() { this.die(); } @@ -415,6 +415,27 @@ public abstract class Entity { d2 += d8; } } + + while (d0 != 0.0D && d2 != 0.0D && this.world.getCubes(this, this.boundingBox.c(d0, -1.0D, d2)).size() == 0) { + if (d0 < d8 && d0 >= -d8) { + d0 = 0.0D; + } else if (d0 > 0.0D) { + d0 -= d8; + } else { + d0 += d8; + } + + if (d2 < d8 && d2 >= -d8) { + d2 = 0.0D; + } else if (d2 > 0.0D) { + d2 -= d8; + } else { + d2 += d8; + } + + d5 = d0; + d7 = d2; + } } List list = this.world.getCubes(this, this.boundingBox.a(d0, d1, d2)); @@ -620,7 +641,7 @@ public abstract class Entity { } } - boolean flag2 = this.aS(); + boolean flag2 = this.aT(); if (this.world.d(this.boundingBox.shrink(0.0010D, 0.0010D, 0.0010D))) { this.burn(1); @@ -725,11 +746,11 @@ public abstract class Entity { } } - public boolean aS() { + public boolean aT() { return this.bV || this.world.y(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)); } - public boolean aT() { + public boolean aU() { return this.bV; } @@ -758,7 +779,7 @@ public abstract class Entity { return 0.0F; } - public boolean aU() { + public boolean aV() { return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA); } @@ -905,12 +926,12 @@ public abstract class Entity { this.ce = true; } - protected void aV() { + protected void aW() { this.velocityChanged = true; } public boolean damageEntity(DamageSource damagesource, int i) { - this.aV(); + this.aW(); return false; } @@ -925,7 +946,7 @@ public abstract class Entity { public void b(Entity entity, int i) {} public boolean c(NBTTagCompound nbttagcompound) { - String s = this.aW(); + String s = this.aX(); if (!this.dead && s != null) { nbttagcompound.setString("id", s); @@ -1050,7 +1071,7 @@ public abstract class Entity { // CraftBukkit end } - protected final String aW() { + protected final String aX() { return EntityTypes.b(this); } @@ -1131,14 +1152,14 @@ public abstract class Entity { return null; } - public void Q() { + public void R() { if (this.vehicle.dead) { this.vehicle = null; } else { this.motX = 0.0D; this.motY = 0.0D; this.motZ = 0.0D; - this.G_(); + this.F_(); if (this.vehicle != null) { this.vehicle.i_(); this.f += (double) (this.vehicle.yaw - this.vehicle.lastYaw); @@ -1188,10 +1209,10 @@ public abstract class Entity { } public void i_() { - this.passenger.setPosition(this.locX, this.locY + this.x_() + this.passenger.V(), this.locZ); + this.passenger.setPosition(this.locX, this.locY + this.x_() + this.passenger.W(), this.locZ); } - public double V() { + public double W() { return (double) this.height; } @@ -1276,11 +1297,11 @@ public abstract class Entity { return 0.1F; } - public Vec3D aI() { + public Vec3D aJ() { return null; } - public void ac() {} + public void ad() {} public ItemStack[] getEquipment() { return null; @@ -1472,7 +1493,7 @@ public abstract class Entity { return LocaleI18n.get("entity." + s + ".name"); } - public Entity[] ba() { + public Entity[] bb() { return null; } @@ -1480,7 +1501,7 @@ public abstract class Entity { return this == entity; } - public float aq() { + public float ar() { return 0.0F; } |