Paper icon indicating copy to clipboard operation
Paper copied to clipboard

`Player#setPlayerProfile` causing desync issues

Open tal5 opened this issue 2 years ago • 7 comments

Expected behavior

Player#setPlayerProfile to set the player's profile and update the client, while keeping everything else properly synced.

Observed/Actual behavior

Player#setPlayerProfile seems to cause desync issues, for example: If a player's profile is updated while riding an entity, it'll appear as if they dismounted to them and they'll be able to freely walk around, but once they actually dismount they'll teleport back. This happens for other things as well, such as leads.

Steps/models to reproduce

  1. Add a plugin that runs player.setPlayerProfile(player.getPlayerProfile()) to a 1.19.3 Paper server (see the test plugin linked below).
  2. Mount a horse.
  3. Trigger that plugin.

Plugin and Datapack List

> plugins
[23:06:30 INFO]: Plugins (1): test
> datapack list
[23:06:55 INFO]: There are 2 data packs enabled: [vanilla (built-in)], [file/bukkit (world)]
[23:06:55 INFO]: There are no more data packs available

No plugins or datapacks other then my test plugin.

Paper version

> version
[23:08:55 INFO]: Checking version, please wait...
[23:08:55 INFO]: This server is running Paper version git-Paper-362 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT) (Git: 52718db)
You are running the latest version
Previous version: git-Paper-360 (MC: 1.19.3)

Other

The plugin I used for testing: https://pastebin.com/1hdqmLw0 A video of the issue:

https://user-images.githubusercontent.com/31237389/209587838-015a8a8f-0262-43f1-9f8a-79c8d3537cf5.mp4

tal5 avatar Dec 26 '22 23:12 tal5

There’s a plethora of issues with this method. I have some fixes on my end I’ll be able to pull. 👍

Can confirm however.

Owen1212055 avatar Dec 26 '22 23:12 Owen1212055

There’s a plethora of issues with this method. I have some fixes on my end I’ll be able to pull. 👍

Can confirm however.

Could you pull those changes if you haven't yet, I'd love to use the method for changing skins dynamically without version dependent code :)

Xemorr avatar Feb 20 '23 21:02 Xemorr

Yeah, the diff is mangled in https://github.com/PaperMC/Paper/pull/8294 .

Owen1212055 avatar Feb 20 '23 21:02 Owen1212055

Any progress?

Xemorr avatar Mar 04 '23 15:03 Xemorr

@Owen1212055, this issue is still present in git-Paper-499 (MC: 1.19.4).

If I change PlayerProfile "textures" property and then call setPlayerProfile with updated PlayerProfile on self while riding a boat, then on client side I will leave boat but the server thinks otherwise and will teleport me back to near boat if I press [Shift].

molor avatar Apr 11 '23 19:04 molor

Looks like there's more here, will get on this.

Owen1212055 avatar Apr 11 '23 19:04 Owen1212055

Still present in 1.20.4-b424

molor avatar Feb 21 '24 05:02 molor