Skip to content

Comments

feat: do not try to sync data attachments to vanilla clients#2964

Open
Kinsteen wants to merge 3 commits intoneoforged:1.21.xfrom
Kinsteen:feat-stop-attachments-sync-to-vanilla
Open

feat: do not try to sync data attachments to vanilla clients#2964
Kinsteen wants to merge 3 commits intoneoforged:1.21.xfrom
Kinsteen:feat-stop-attachments-sync-to-vanilla

Conversation

@Kinsteen
Copy link

This was discussed on Discord: https://discord.com/channels/313125603924639766/852298000042164244/1470546865438068808

We want to not break the vanilla compat when using data attachments auto synced. We add some checks in AttachmentsSync to see if we have the channel for the packet, if not, we simply don't send the sync packet.

@neoforged-automation neoforged-automation bot added the 1.21.11 Targeted at Minecraft 1.21.11 label Feb 10, 2026
@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@Technici4n
Copy link
Member

Sounds good, but is there a way to not use the NetworkRegistry directly? It's internal, so other NeoForge hooks should avoid using it as well.

@Kinsteen
Copy link
Author

We don't seem to have a public (non internal) API to query network channels, and everything about it on Neo side seems marked internal. We could do instead check the connection type (vanilla vs neoforge) which is public API, and would technically do the same thing. Would this be good enough?

@Technici4n
Copy link
Member

Such an API exists, exposed through some extension method. Maybe on the collection and/or on the packet listener.

@ApexModder
Copy link
Member

This is correct ICommonPacketListener#hasChannel exists and should be used over interacting with the NetworkRegistry directly

here you would do serverPlayer.connection.hasChannel(SyncAttachmentsPayload.TYPE)

@Kinsteen Kinsteen force-pushed the feat-stop-attachments-sync-to-vanilla branch from b8ac503 to 261c667 Compare February 11, 2026 21:53
@Kinsteen
Copy link
Author

I may be dumb 😅 Thanks for the pointer!

@Matyrobbrt

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.21.11 Targeted at Minecraft 1.21.11

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants