-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix camera desync #13207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix camera desync #13207
Conversation
|
Where are you getting the player camera to have this happen? This seems xy, I donno. |
|
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) |
|
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. |
|
Okay, the event not firing on dimension change is a bug due to paper reusing the player entity on dimension switch. |
|
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
Setting player's camera before they had sent
ServerboundPlayerLoadedPacketdesyncs it.This should fix it