[1.21.6] Fix recovery on initial resource reload causing mod loading to run twice
This PR fixes a bug where certain loading errors during the initial resource reload would cause parts of client mod loading to run twice due to vanilla cancelling the active reload, unloading all resource packs and starting a second resource reload to recover from resource loading errors. This causes irrelevant additional errors that mask the actual error in the crash report.
While this fixes the underlying bug, it also uncovers another issue where the recovery reload appears to overwrite Neo's loading error screen and instead causes the game to go to the main menu while rendering only the loading overlay background (1.21.1 behaves very similar, except that it also shows the Mojang logo and the progress bar at ~70%).
- [ ] Publish PR to GitHub Packages
Bump. This is relevant from 1.21.1 onward. Posting this comment in Waterpicker's stead due to Dimensional Doors progress being halted on NeoForge due to this specific problem.
As mentioned in the PR description, this PR cannot be merged in its current state and neither can a backport on 1.21.1 as the change causes even worse behavior on the user end by breaking the UI entirely.
After digging further into this, I've found that the only bulletproof solution is to capture mod loading errors during the initial resource reload and hard-crash to prevent the recovery reload. While this is overall not a great solution, it's IMO better than the confusing errors caused by trying to run mod loading twice or, even worse, displaying a useless black screen that may accept interactions. In the future this could be replaced by a call to the MC-independent error screen.
@XFactHD, this pull request has conflicts, please resolve them for this PR to move forward.