Skip to content

Don't always send dummy respawn - #1299

Open
OptimisticDeving wants to merge 1 commit into
ViaVersion:masterfrom
OptimisticDeving:dont-always-send-dummy-respawn
Open

Don't always send dummy respawn#1299
OptimisticDeving wants to merge 1 commit into
ViaVersion:masterfrom
OptimisticDeving:dont-always-send-dummy-respawn

Conversation

@OptimisticDeving

Copy link
Copy Markdown

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.

@kennytv

kennytv commented Jul 18, 2026

Copy link
Copy Markdown
Member

This would make it no longer sent, ever, if installed on the backend

@OptimisticDeving
OptimisticDeving force-pushed the dont-always-send-dummy-respawn branch from 78ce022 to bc6fb18 Compare July 18, 2026 13:56
@OptimisticDeving

Copy link
Copy Markdown
Author

This would make it no longer sent, ever, if installed on the backend

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?

@OptimisticDeving
OptimisticDeving force-pushed the dont-always-send-dummy-respawn branch from bc6fb18 to ed89270 Compare July 18, 2026 16:15
@kennytv

kennytv commented Jul 18, 2026

Copy link
Copy Markdown
Member

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

@OptimisticDeving
OptimisticDeving force-pushed the dont-always-send-dummy-respawn branch from ed89270 to 99af320 Compare July 18, 2026 18:20
@OptimisticDeving
OptimisticDeving marked this pull request as draft July 18, 2026 18:31
@OptimisticDeving
OptimisticDeving force-pushed the dont-always-send-dummy-respawn branch from 99af320 to e01128a Compare July 18, 2026 18:33
@OptimisticDeving

Copy link
Copy Markdown
Author

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

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.

@OptimisticDeving
OptimisticDeving marked this pull request as ready for review July 18, 2026 18:40
@OptimisticDeving
OptimisticDeving force-pushed the dont-always-send-dummy-respawn branch from e01128a to e96e3b1 Compare July 19, 2026 22:34
@OptimisticDeving
OptimisticDeving force-pushed the dont-always-send-dummy-respawn branch from e96e3b1 to cd35fe5 Compare July 29, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants