diff options
author | Andrew Ardill <andrew.ardill@gmail.com> | 2011-03-10 05:37:12 +1100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-03-09 19:43:43 +0000 |
commit | b819ffe8a4a5c8d0994a02374eabe1de9e8d9355 (patch) | |
tree | 93863cb404105d0d35c9713bfb8fbddff4e5e9ab /src/main/java/org/bukkit | |
parent | 454da93a00ef7e9f44cb0184a0d94387ccdd6b01 (diff) | |
download | craftbukkit-b819ffe8a4a5c8d0994a02374eabe1de9e8d9355.tar craftbukkit-b819ffe8a4a5c8d0994a02374eabe1de9e8d9355.tar.gz craftbukkit-b819ffe8a4a5c8d0994a02374eabe1de9e8d9355.tar.lz craftbukkit-b819ffe8a4a5c8d0994a02374eabe1de9e8d9355.tar.xz craftbukkit-b819ffe8a4a5c8d0994a02374eabe1de9e8d9355.zip |
Implemented LivingEntity.getEyeLocation()
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index c6e478f9..51a6c91b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -6,6 +6,8 @@ import net.minecraft.server.EntityArrow; import net.minecraft.server.EntityEgg; import net.minecraft.server.EntityLiving; import net.minecraft.server.EntitySnowball; + +import org.bukkit.Location; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; @@ -171,4 +173,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void damage(int amount, org.bukkit.entity.Entity source) { entity.a(((CraftEntity)source).getHandle(), amount); } + + public Location getEyeLocation() { + Location loc = getLocation(); + loc.setY(loc.getY() + getEyeHeight()); + return loc; + } } |