-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.20.4/5] Improved ModMismatchDisconnectedScreen and clientside handling of channel mismatches in general #672
[1.20.4/5] Improved ModMismatchDisconnectedScreen and clientside handling of channel mismatches in general #672
Conversation
…nnel mismatches in general
|
src/main/java/net/neoforged/neoforge/client/gui/ModMismatchDisconnectedScreen.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/client/gui/ModMismatchDisconnectedScreen.java
Outdated
Show resolved
Hide resolved
also updated some javadoc
- PlayRegistrations and ConfigurationRegistrations now store the id of the mod they were created from, which is retrieved via the ModLoadingContext - This mod id is used to enhance the channel mismatch reason component to always include the mod name (this enhancing is done on the side that the channel was registered on) - Since some of that reason component enhancing is done in the constructor of the MMDS, the logging of channel mismatch entries has been moved to there as well - There is now also a button that toggles listing only one (default) or all channels with the same reason component
src/main/java/net/neoforged/neoforge/network/registration/ModdedPacketRegistrar.java
Outdated
Show resolved
Hide resolved
For this solution to work, the verification that a registered payload's namespace needs to match the mod id of the registrar had to be removed, in order to allow mods passing their proper mod id to the registrar while still being able to register payloads for any namespace they desire using that registrar (as has been one of the ideas of the Network Refactor). Suggestion: put a duplication check in NetworkRegistry#setup where the channels are built, since currently duplicate payload ids just seem to be silently overwriting each other, which doesn't feel intentional.
Hello, I know you are currently busy with the new snapshots and (if I understood that right) an internal network api refactor by Shadows, but a continuation of the conversation above would still be greatly appreciated. With my latest commit, I've now removed all usages of the static |
To summarize the discussion surrounding this: We have collectively decided the ownership-tracking approach (through the loading context) is not stable enough to warrant using, nor do we apply it for any of the other types of objects that are synchronized. We will be pursuing a new solution which better permits mods to declare their network compatibility and provide the user with actual information instead of relying solely on channel and registry compatibility. That said, we are still interested in receiving the improvements to the Screen and the channel mismatch handling, so we can move forward here. As far as the current change set goes, the |
Hello, thank you for the information! So to clarify, does that mean that no form of channel mismatch entry merging (even through tracking the owning mod of the channels) is going to get accepted (even though it has significant usability benefits compared to just listing all entries in my opinion)? If so, I can remove the relevant code from the PR to only make it consist of screen formatting fixes. |
We can still do the merging. Realistically the unmerged version is mostly useless to an end user due to the volume of information. |
I agree, the unmerged information is just too vast and confusing for the general end user. However, I'm now confused about which criterion should be used to merge the channel mismatch entries, if both merging based on channel namespaces as well as merging based on owning mods (through mod ownership tracking) is off the table. Is there another option that allows for a usable and logical merging of channel mismatch entries that I have missed? |
Grouping by the registered namespace should be sufficient. This screen should basically be a last-effort fallback (same for the registry entry mismatch), as we will be expecting that mods providing networked components (registry entries, channels, data maps, etc) use the new system. The new pipeline will be something akin to the following:
|
Alright, thank you for your explanation, I don't think I completely understand it (since I haven't fully kept track of maintainer discussions regarding these changes), but I will re-add grouping of channel mismatch entries based on channel id namespaces. Should I also re-add the logic that tries to find (and display the name of) the mod of which the mod id is the same as the merged channel namespace? |
Yeah we can retain the modid->name lookup feature. |
- The name of the mod which id matches the mismatching channel namespace is displayed in the channel mismatch entry's reason component, so users have a potential mod candidate to add/update/remove - The feature of tracking the mod that registered a channel has been removed again - Re-added the exception that occurs when a channel gets registered to a registrar with a mod id which is different to the channel's namespace
Alright, the prior channel-namespace-merging logic has been restored. The visual appearance of the screen doesn't differ from the previous screenshot sent into here, so I'll not post another screenshot this time. I'll resolve the open review above, please tell me what else needs to be changed. |
Hello, I've now resolved the merge conflicts with the 1.20.5 NeoForge changes and updated some code to make the MMDS work in 1.20.5 (the screen looks really cool with the main menu panorama background). Since Shadow's Network Refactor is now merged and there are (hopefully) no more major changes to the network architecture, I'd really like to know if/how to move forward with this PR. Since this PR does not introduce a breaking change, it doesn't need to be merged during the beta window, so if you have other priorities (which you probably do) those can always go first. |
…ng of channel mismatches in general (neoforged#672)
This PR aims to improve the user experience of getting disconnected from a NeoForge server due to channel mismatches, mainly by improving the usability of the ModMismatchDisconnectedScreen (the screen that shows instead of the default DisconnectedScreen if a NeoForge server disconnects the client due to channel mismatches) and also two other related changes. The ModMismatchDisconnectedScreen was previously adapted as part of the network refactor and its changes to handling channel mismatches, and this PR finalizes these adaptations to bring back most of the design elements and advantages that existed before the network refactor.
Changes to the ModMismatchDisconnectedScreen:
Other changes:
Configuration and play channels now store the id of the mod that registered them (the id is retrieved through the ModLoadingContext); this information is not sent over the network (to prevent this PR from potentially becoming a breaking change), and so only available on the side that the channel was registered onEdit: This was decided against by maintainersFurther points to discuss:
Should we rename the current "Channel name" header to "Mod name" or something similar? This is because, in my opinion, users shouldn't concern themselves about what a channel is and thus the concept of channels should be mentioned as little as possible.This proposition is no longer relevant.Visual comparison between the previous and updated ModMismatchDisconnectedScreen:
(Edit: the updated MMDS's design is outdated, for the current version see further below)
(Also of note in this example: the previous MMDS had 107 entries corresponding to the 107 mismatching channels, of which only 10 were actually displayed, while the updated MMDS has 5 entries corresponding to the 5 mismatching mods.)