Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions HMCL/src/main/java/org/jackhuang/hmcl/ui/InstallerItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ public InstallerItemGroup(String gameVersion, Style style) {
this.libraries = all;
} else if (gameVersion.equals("1.12.2")) {
this.libraries = new InstallerItem[]{game, forge, cleanroom, liteLoader, legacyfabric, legacyfabricApi, optiFine};
} else if (GameVersionNumber.compare(gameVersion, "1.2.5") <= 0) {
this.libraries = new InstallerItem[]{game};
} else if (GameVersionNumber.compare(gameVersion, "1.5.1") <= 0) {
this.libraries = new InstallerItem[]{game, legacyfabric, legacyfabricApi};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve installed loaders when filtering old versions

When loading an existing 1.3–1.5.1 instance that already contains Forge, this branch omits that loader from getLibraries(). InstallerListPage.loadInstance() renders recognized loaders only from this array, while its analyzer fallback explicitly skips every ID recognized by LibraryType.fromPatchId, so the installed Forge entry disappears and the user can no longer update or remove it through this page. Restrict the filtering to installation choices or separately retain recognized loaders that are already installed.

Useful? React with 👍 / 👎.

} else if (GameVersionNumber.compare(gameVersion, "1.6.4") <= 0) {
this.libraries = new InstallerItem[]{game, forge, liteLoader, legacyfabric, legacyfabricApi};
} else if (GameVersionNumber.compare(gameVersion, "1.13.2") <= 0) {
this.libraries = new InstallerItem[]{game, forge, liteLoader, optiFine, legacyfabric, legacyfabricApi};
} else {
Expand Down