Player animations played with /playanimation or Entity.playAnimation() stop when opening the pause screen for the first time
Partner Rank: 2 (Important)
Partner Team Reporting: Oreville Studios
Verification builds:
- 1.20.0.03_RC2 (Windows 10, Partner Build 25472684)
- 1.21.10.24_RC0 (Windows 10, Partner Build 25613529)
Regression Builds: Unknown, likely always broken
Summary:
When animations run on players through the /playanimation command or the Entity.playAnimation() script API, the animation will stop when the player pauses their game for the first time after joining a world. This appears to be related to the paper doll in the pause screen, as when the player loads the paper doll in the pause screen for the first time, all runtime animation controllers added through the /playanimation command or API are removed (see attached video, Animation_controller_cleared.mp4).
Impact:
In our case, we use /playanimation quite a lot in our existing content because it is a very simple way to run animations on players without editing the client player entity JSON file, allowing persona skins to work. We use it in cutscenes a lot and if a player pauses during a cutscene, the animation will simply stop and look quite awkward (see attached media that impacts the 15 Year Journey map, 15_Year_Journey_repro.mp4). Additionally, because we are limited to /playanimation and the API for player animations in addons, this will affect any addon that attempts to add player animations. We have content in development that is blocked by this bug. Additionally, many other partners likely use this command to play animations on players in their existing content.
Repro Steps:
- Create a new world or join an existing world.
- Enter third person
- Run this command in chat
/playanimation @s animation.player.swim
- Quickly pause the game
Observed Results:
The swim animation ends prematurely as the player opens the pause screen. This media is attached as Vanilla_swim_repro.mp4.
Expected Results:
The swim animation plays fully when the player pauses for the first time.
Screenshots / Videos attached: Yes
Notes: N/A