mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-3565: Head yaw is "more accurate" for living entities
By: md_5 <git@md-5.net>
This commit is contained in:
parent
6f9b17e08b
commit
32a52470be
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue