diff options
author | Erik Broes <erikbroes@grum.nl> | 2012-02-29 22:31:04 +0100 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-01 01:12:41 +0000 |
commit | 33ba9f0a2f56bdba89574d25b44905af95480dbe (patch) | |
tree | dd446975bfd0406c3deac50c0bc1e156ca737698 /src/main/java/net/minecraft/server/EntityArrow.java | |
parent | 8524ff8ef7be2d386e98f65fdca14c0157e8309f (diff) | |
download | craftbukkit-33ba9f0a2f56bdba89574d25b44905af95480dbe.tar craftbukkit-33ba9f0a2f56bdba89574d25b44905af95480dbe.tar.gz craftbukkit-33ba9f0a2f56bdba89574d25b44905af95480dbe.tar.lz craftbukkit-33ba9f0a2f56bdba89574d25b44905af95480dbe.tar.xz craftbukkit-33ba9f0a2f56bdba89574d25b44905af95480dbe.zip |
Updated to rename revision 02
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityArrow.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityArrow.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index 2a9bc1ed..70a352f8 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -44,7 +44,7 @@ public class EntityArrow extends Entity { this.shooter = entityliving; this.fromPlayer = entityliving instanceof EntityHuman; this.b(0.5F, 0.5F); - this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.y(), entityliving.locZ, entityliving.yaw, entityliving.pitch); + this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight(), entityliving.locZ, entityliving.yaw, entityliving.pitch); this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F); this.locY -= 0.10000000149011612D; this.locZ -= (double) (MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F); @@ -130,7 +130,7 @@ public class EntityArrow extends Entity { vec3d = Vec3D.create(this.locX, this.locY, this.locZ); vec3d1 = Vec3D.create(this.locX + this.motX, this.locY + this.motY, this.locZ + this.motZ); if (movingobjectposition != null) { - vec3d1 = Vec3D.create(movingobjectposition.f.a, movingobjectposition.f.b, movingobjectposition.f.c); + vec3d1 = Vec3D.create(movingobjectposition.pos.a, movingobjectposition.pos.b, movingobjectposition.pos.c); } Entity entity = null; @@ -149,7 +149,7 @@ public class EntityArrow extends Entity { MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1); if (movingobjectposition1 != null) { - double d1 = vec3d.c(movingobjectposition1.f); // CraftBukkit - distance efficiency + double d1 = vec3d.distanceSquared(movingobjectposition1.pos); // CraftBukkit - distance efficiency if (d1 < d0 || d0 == 0.0D) { entity = entity1; @@ -226,9 +226,9 @@ public class EntityArrow extends Entity { this.g = movingobjectposition.d; this.h = this.world.getTypeId(this.e, this.f, this.g); this.i = this.world.getData(this.e, this.f, this.g); - this.motX = (double) ((float) (movingobjectposition.f.a - this.locX)); - this.motY = (double) ((float) (movingobjectposition.f.b - this.locY)); - this.motZ = (double) ((float) (movingobjectposition.f.c - this.locZ)); + this.motX = (double) ((float) (movingobjectposition.pos.a - this.locX)); + this.motY = (double) ((float) (movingobjectposition.pos.b - this.locY)); + this.motZ = (double) ((float) (movingobjectposition.pos.c - this.locZ)); f2 = MathHelper.sqrt(this.motX * this.motX + this.motY * this.motY + this.motZ * this.motZ); this.locX -= this.motX / (double) f2 * 0.05000000074505806D; this.locY -= this.motY / (double) f2 * 0.05000000074505806D; |