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/EntityEnderman.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/EntityEnderman.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityEnderman.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java index 7e430803..1c45dcef 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -74,7 +74,7 @@ public class EntityEnderman extends EntityMonster { return false; } else { Vec3D vec3d = entityhuman.e(1.0F).b(); - Vec3D vec3d1 = Vec3D.create(this.locX - entityhuman.locX, this.boundingBox.b + (double) (this.length / 2.0F) - (entityhuman.locY + (double) entityhuman.y()), this.locZ - entityhuman.locZ); + Vec3D vec3d1 = Vec3D.create(this.locX - entityhuman.locX, this.boundingBox.b + (double) (this.length / 2.0F) - (entityhuman.locY + (double) entityhuman.getHeadHeight()), this.locZ - entityhuman.locZ); double d0 = vec3d1.c(); vec3d1 = vec3d1.b(); @@ -187,7 +187,7 @@ public class EntityEnderman extends EntityMonster { } protected boolean f(Entity entity) { - Vec3D vec3d = Vec3D.create(this.locX - entity.locX, this.boundingBox.b + (double) (this.length / 2.0F) - entity.locY + (double) entity.y(), this.locZ - entity.locZ); + Vec3D vec3d = Vec3D.create(this.locX - entity.locX, this.boundingBox.b + (double) (this.length / 2.0F) - entity.locY + (double) entity.getHeadHeight(), this.locZ - entity.locZ); vec3d = vec3d.b(); double d0 = 16.0D; @@ -229,16 +229,17 @@ public class EntityEnderman extends EntityMonster { // CraftBukkit start - teleport event EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), new Location(this.world.getWorld(), d3, d4, d5), new Location(this.world.getWorld(), this.locX, this.locY, this.locZ)); this.world.getServer().getPluginManager().callEvent(teleport); - if (!teleport.isCancelled()) { - Location to = teleport.getTo(); - this.setPosition(to.getX(), to.getY(), to.getZ()); - if (this.world.a((Entity) this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox)) { - flag = true; - } - } else { + if (teleport.isCancelled()) { return false; } + + Location to = teleport.getTo(); + this.setPosition(to.getX(), to.getY(), to.getZ()); // CraftBukkit end + + if (this.world.getCubes(this, this.boundingBox).size() == 0 && !this.world.containsLiquid(this.boundingBox)) { + flag = true; + } } } |