-
Bug
-
Resolution: Invalid
-
Minor
-
None
-
None
-
None
-
OS: Ubuntu 20.04
Java: 17.0.1+12-LTS-39 (Oracle Java™ SE Runtime Environment)
Args: -Xmx4G -Xms1G
Server and client are running on the same machine. No system overload or other observable high ping/lag.
-
3363-Spigot-f65de01-e36f759 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT)
-
Yes
Summary
Armor stands, that are rotated using ArmorStand#setRotation() right after being spawned in, synchronize their rotation on the game clients only after multiple seconds have passed.
Description of the attached image
The armor stand was spawned using the following code and is observed in spectator mode, to still be transparently visible:
ArmorStand armorstand = (ArmorStand) signBlock.getWorld().spawnEntity(location, EntityType.ARMOR_STAND, false);
armorstand.setRotation(-90.0f, 0f);
armorstand.setVisible(false);
// make small; show arms; move arm to point forward …
Looking at the entity data using the in-game command /data get entity @e[type=minecraft:armor_stand,limit=1,sort=nearest] shows that the (transparent) armor stand is rotated to face [-90.f,0.0f] (east) but the referenced entity is clearly facing [0.0f,0.0f] (south; like the player who spectates it) in-game.
Only after multiple seconds the armor stand rotates in the right position on the client-side.
However, changes using #setVisible() or #setRightArmPose() are applied immediately.
PS: I'm aware that you can set an entity's yaw by determining it over it's (initial) location. This is what I have done to fix it. But if Entity#setRotation(float,float) exists, it should work as well.