Don't always send dummy respawn - #1299
Conversation
|
This would make it no longer sent, ever, if installed on the backend |
78ce022 to
bc6fb18
Compare
I don't have any frame of reference for what the proxy and clientside checks are supposed to fix - taking BungeeCord as an example, it will always send respawn packets that inform the player to drop attributes... If this check is unnecessary, the check could be replaced with: (clientWorld.getEnvironment() != null && dimension == clientWorld.getEnvironment().id())
&& (!keepPlayerAttributes || !nextWorldName.equalsIgnoreCase(worldNameTracker.getWorldName()))which should fire on the backend. Otherwise, it would always fire on things like Velocity, which deviates from expected behavior. Is this acceptable? |
bc6fb18 to
ed89270
Compare
|
The client side check needs to stay, and the removed proxy check has to be tested - switching servers on a proxy where both have you land in the same dimension with the same world name |
ed89270 to
99af320
Compare
99af320 to
e01128a
Compare
Okay, I've added the client side check back, but I've only made that check matter if the platform is not a proxy - otherwise, keep attribute respawns on the backend server will always become full respawns if Via is running on the proxy, which would make this PR essentially redundant. Switching between two identical servers with the same world configuration and same default world (with the same world name and same dimension) seems to work. |
e01128a to
e96e3b1
Compare
e96e3b1 to
cd35fe5
Compare
Should fix a regression introduced by 29d3787, forcing keep attributes respawns to work like non-keep attribute respawns, causing the client to forget chunks & the server to not resend them, leading to hacky workarounds like this (good thing it doesn't run on Velocity proxies, or otherwise I wouldn't have figured this out :P).
Keep attribute respawns are invoked when a Paper plugin makes a change to a player's profile (for example, changing their skin).
In theory, world changes should always be non-keep attribute respawns, but I kept the old world name check just in-case my assumption is wrong and causes another regression.
I don't know if this is the best fix, but I have tested it and am unable to reproduce #381 with this patch applied or what the comment describes.