Skip to content

Move initial player attachments sync to the end of PlayerManager::onPlayerConnect#4921

Merged
modmuss50 merged 1 commit intoFabricMC:1.21.10from
Fuzss:fix-initial-player-attachment-sync
Oct 18, 2025
Merged

Move initial player attachments sync to the end of PlayerManager::onPlayerConnect#4921
modmuss50 merged 1 commit intoFabricMC:1.21.10from
Fuzss:fix-initial-player-attachment-sync

Conversation

@Fuzss
Copy link
Member

@Fuzss Fuzss commented Oct 11, 2025

Hey, I just stumbled across an issue with player attachment syncing. When logging in, existing attachment are never synced as the hook for that (via ServerPlayConnectionEvents.JOIN in PlayerManager::onPlayerConnect) runs too early. Presumable before syncedAttachments is set up in AttachmentTargetsMixin which happens from fabric_readAttachmentsFromNbt.

This can easily be fixed by invoking syncing logic at the end of PlayerManager::onPlayerConnect, which I can confirm to work and which is also what NeoForge does.

@Fuzss Fuzss added bug Something isn't working small change priority: high High priority PRs that need review and work now. Review these first. labels Oct 11, 2025
@Fuzss Fuzss requested a review from Syst3ms October 11, 2025 13:15
Copy link
Contributor

@Syst3ms Syst3ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do you think it would be possible to add a regression test for this?

Copy link
Contributor

@apple502j apple502j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In another PR please update javadoc for SPCE

@modmuss50 modmuss50 added the status: merge me please Pull requests that are ready to merge label Oct 15, 2025
@modmuss50 modmuss50 merged commit 68e881b into FabricMC:1.21.10 Oct 18, 2025
4 checks passed
modmuss50 pushed a commit that referenced this pull request Oct 18, 2025
(cherry picked from commit 68e881b)
modmuss50 pushed a commit that referenced this pull request Oct 18, 2025
(cherry picked from commit 68e881b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high High priority PRs that need review and work now. Review these first. small change status: merge me please Pull requests that are ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants