diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 9ef7686b3e..36571353c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -217,7 +217,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } public Location getLocation() { - return new Location(getWorld(), entity.locX, entity.locY, entity.locZ, entity.yaw, entity.pitch); + return new Location(getWorld(), entity.locX, entity.locY, entity.locZ, entity instanceof EntityLiving ? entity.getHeadRotation() : entity.yaw, entity.pitch); } public Location getLocation(Location loc) { @@ -226,7 +226,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { loc.setX(entity.locX); loc.setY(entity.locY); loc.setZ(entity.locZ); - loc.setYaw(entity.yaw); + loc.setYaw(entity instanceof EntityLiving ? entity.getHeadRotation() : entity.yaw); loc.setPitch(entity.pitch); }