Paper
Paper copied to clipboard
`Player#setPlayerProfile` causing desync issues
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
- Add a plugin that runs
player.setPlayerProfile(player.getPlayerProfile())to a 1.19.3 Paper server (see the test plugin linked below). - Mount a horse.
- 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
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.
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 :)
Yeah, the diff is mangled in https://github.com/PaperMC/Paper/pull/8294 .
Any progress?
@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].
Looks like there's more here, will get on this.
Still present in 1.20.4-b424