ConnectorEarlyLoader#hasEncounteredException: check LoadingModList#hasErrors instead of LoadingModList#getModLoadingIssues != empty
#1830
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Issue
Connector will refuse to load Fabric mods if NeoForge encounters an error or warning, which is problematic when a warning is non-fatal, thus allowing the game to continue to load and Fabric mods to act erratically
The Proposal
Check for
LoadingModList.get().hasErrors()instead of!LoadingModList.get().getModLoadingIssues().isEmpty()inConnectorEarlyLoader#hasEncounteredException, which will only returntrueif fatal errors have been encountered instead of including non-fatal warningsPossible Side Effects
Perhaps there was a reason all mod loading issues were checked for, instead of only true errors?
Alternatives
Throw a
RuntimeExceptioninConnectorEarlyLoader#initifConnectorEarlyLoader#hasEncounteredException == true: this would not help with the confusion that stems from NeoForge not printing mod loading issues to the log before it reaches its "pre-title screen" screen (although these issues could also be printed by Connector before throwing, I suppose)Additional Notes
Cool mod thanks