Skip to content

Conversation

@GliczDev
Copy link
Contributor

Setting player's camera before they had sent ServerboundPlayerLoadedPacket desyncs it.
This should fix it

@GliczDev GliczDev requested a review from a team as a code owner October 19, 2025 17:00
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Oct 19, 2025
@Owen1212055
Copy link
Member

Where are you getting the player camera to have this happen? This seems xy, I donno.

@GliczDev
Copy link
Contributor Author

when I teleport player to a different world and set camera directly after that (so player has not yet fully loaded the world, entities do not exist for them, so there's no entity to set camera to - I checked client code for that)

@Owen1212055
Copy link
Member

Owen1212055 commented Oct 20, 2025

Couldnt you instead run that logic in the PlayerClientLoadedWorldEvent instead of setting the entity in that spot?
Just seems like a niche sort of case, but could be argued as a valid desync.

@GliczDev
Copy link
Contributor Author

Couldnt you instead run that logic in the PlayerClientLoadedWorldEvent instead of setting the entity in that spot?

no, the event is not called on dimension change (which, imo, is wrong, because the packet is being sent on dimension change too).

either way, it is a desync and should be fixed in Paper, not with a plugin.

@Owen1212055
Copy link
Member

Okay, the event not firing on dimension change is a bug due to paper reusing the player entity on dimension switch.

@Owen1212055
Copy link
Member

The issue is the spectator logic is VERY client state dependent and is prone to stuff like this.

# Conflicts:
#	paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

2 participants