-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
Since this change: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/a3b3a421ac4ace7786a5375c4c0b4c39d3d9d0ba getYaw() is incorrect at least for armorstands.
How to reproduce: Create a plugin that reports the rotation:
public void onArmorStand(PlayerInteractAtEntityEvent e) {
Entity clicked = e.getRightClicked();
if (clicked instanceof ArmorStand) {
e.getPlayer().sendMessage("Yaw = " + clicked.getLocation().getYaw());
}
}
Place some armorstands from the inventory in different rotations, if you right click them it should report values like 0,45,90,135,180,... (as its specified values are in degrees)
But since that patch it reports values like 3.53511, 0.392059 and similar.
And if you add clicked.teleport(clicked.getLocation()) to the method it will rotate the armorstand.
I don't know if the same is true for other entites, but at least for armorstands the yaw is incorrect.