3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00

SPIGOT-3565: Head yaw is "more accurate" for living entities

Dieser Commit ist enthalten in:
md_5 2017-09-28 16:23:14 +10:00
Ursprung ee91bce157
Commit a3b3a421ac

Datei anzeigen

@ -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);
}