feat: do not try to sync data attachments to vanilla clients#2964
feat: do not try to sync data attachments to vanilla clients#2964Kinsteen wants to merge 3 commits intoneoforged:1.21.xfrom
Conversation
|
|
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. |
|
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? |
|
Such an API exists, exposed through some extension method. Maybe on the collection and/or on the packet listener. |
|
This is correct here you would do |
b8ac503 to
261c667
Compare
|
I may be dumb 😅 Thanks for the pointer! |
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.