fix: made Custom Titlescreen more robust against freezing#20
Merged
KdGaming0 merged 1 commit intoKdGaming0:v4from Mar 15, 2026
Merged
fix: made Custom Titlescreen more robust against freezing#20KdGaming0 merged 1 commit intoKdGaming0:v4from
KdGaming0 merged 1 commit intoKdGaming0:v4from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Description
Summary
This change fixes the title screen replacement loop without changing the normal PackCore startup flow.
It also removes an unnecessary
preLaunchdependency on thePackCoreclient initializer sopreLaunchno longer pulls client-side classes in earlier than needed.What changed
1. Guard the title screen replacement path
In PackCore.java, the
ScreenEvents.BEFORE_INIThook now bails out when:TitleScreenPackCoreTitleScreenThe welcome wizard behavior stays the same:
successfulWelcomeWizardisfalse, PackCore opensWelcomeWizardScreen2. Decouple
preLaunchfromPackCoreIn PackCorePreLaunch.java,
packcoreDiris now built fromgameDir.resolve("packcore")instead of readingPackCore.PACKCORE_DIR.Why this works
Title screen loop
PackCoreTitleScreenextendsTitleScreen. That means the globalBEFORE_INIThook also sees PackCore's own replacement screen unless it is explicitly excluded.Without a guard, this flow can happen:
TitleScreeninitializesPackCoreTitleScreenPackCoreTitleScreeninitializesTitleScreenThat creates a re-entry loop.
The fix works because PackCore now stops once it is already handling its own replacement path. Vanilla
TitleScreenis still redirected, but PackCore's own title screen is not redirected again.preLaunchsafetypreLaunchonly needs the PackCore config directory path. It does not need the fullPackCoreclient initializer.By computing the path locally instead of touching
PackCore.PACKCORE_DIR,PackCorePreLaunchno longer forcesPackCoreto load during thepreLaunchstage. That keeps early startup simpler and avoids loading unrelated client classes before the normal client entrypoint runs.Behavior impact
successfulWelcomeWizardisfalsepreLaunchstill reads and applies config packs exactly as beforeVerification
.\gradlew.bat compileJava