Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

NPC Body Rotation doesn't persist properly

Open Garfieldwxg55 opened this issue 3 years ago • 4 comments

/version output

This server is running Paper version git-Paper-260 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: bc68ee0)
You are running the latest version
Previous version: git-Paper-252 (MC: 1.18.2)

/version Citizens output

Citizens version 2.0.29-SNAPSHOT (build 2509)

Log file

https://paste.denizenscript.com/View/94426

config.yml

https://paste.denizenscript.com/View/94425

saves.yml

https://paste.denizenscript.com/View/94424

Profiler report

No response

Description

I've noticed that NPC's saving their rotation when a player leaves and rejoins a server is really inconsistant. Some NPCs from older versions of the plugin seem to have saved their rotation correctly, but my newer ones don't seem to do that and instead face their heads in the right direction but their bodies will be awkwardly rotated. I've tried setting their rotation with /lookclose, but they go back to their old rotation after I leave the server and rejoin.

Garfieldwxg55 avatar Mar 18 '22 09:03 Garfieldwxg55

Update from testing and discussion in the dev channels:

Body rotation on older versions was synchronized to the head rotation by displaying an arm-swing animation, as this would force the body to match the head clientside. The NPC's head was then rotated from there to match the saved rotation.

In 1.18.2, this appears to no longer work:

Meaning, a new solution to the issue will have to be found to correctly sync body&head yaw in modern minecraft versions.

mcmonkey4eva avatar Mar 19 '22 08:03 mcmonkey4eva

Just updating here from a few weeks ago; Minecraft arm swing code hasn't changed, unfortunately nothing else has been added to sync / set body yaw for players.

fullwall avatar Apr 05 '22 06:04 fullwall

It has been requested by another user* to have a command to link head/body rotation to the same value automatically.

Relatedly it'd also be nice to have something like a /npc moveto --body [yaw]

(* who unfortunately had to be blocked from this repo and Discord due to the inappropriate argumentative way they about it)

mcmonkey4eva avatar Sep 16 '22 23:09 mcmonkey4eva

This issue has changed(?). Body rotation now persists, but head rotation for player NPCs always defaults to south for some reason. If you leave an NPC's active area and then load it back in, its head will face south by default.

JellyTale avatar May 13 '24 19:05 JellyTale