Conversation
CiiLu
commented
Mar 29, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds Ornithe (and Ornithe OSL) to HMCL’s “Auto Install” pipeline by introducing new download/version-list/install-task implementations, extending modloader detection & UI surfaces, and updating docs/translations to advertise the new capability.
Changes:
- Add Ornithe/Ornithe OSL version lists and installation tasks in HMCLCore.
- Extend LibraryAnalyzer / ModLoaderType / launcher env vars and wire Ornithe into installer UI + icons.
- Update docs and multiple locale strings to include Ornithe in supported modloader lists.
Reviewed changes
Copilot reviewed 44 out of 47 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/README.md | Mention Ornithe in supported modloaders list (English). |
| docs/README_en_Qabs.md | Mention Ornithe in upside-down English README. |
| docs/README_es.md | Mention Ornithe in Spanish README. |
| docs/README_ja.md | Mention Ornithe in Japanese README. |
| docs/README_lzh.md | Mention Ornithe in Literary Chinese README. |
| docs/README_ru.md | Mention Ornithe in Russian README. |
| docs/README_uk.md | Mention Ornithe in Ukrainian README. |
| docs/README_zh.md | Mention Ornithe in Simplified Chinese README. |
| docs/README_zh_Hant.md | Mention Ornithe in Traditional Chinese README. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/mod/mcbbs/McbbsModpackExportTask.java | Refactor manifest addon generation to iterate detected libraries. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/mod/ModLoaderType.java | Add loader IDs and introduce ORNITHE. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java | Populate INST_* env vars via detected modloaders. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/ornithe/OrnitheVersionList.java | New Ornithe version list via meta.ornithemc.net. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/ornithe/OrnitheRemoteVersion.java | New remote version type for Ornithe loader installs. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/ornithe/OrnitheOSLVersionList.java | New Modrinth-backed version list for Ornithe OSL. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/ornithe/OrnitheOSLRemoteVersion.java | New remote version type for Ornithe OSL installs. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/ornithe/OrnitheOSLInstallTask.java | New install task to download OSL jar into mods folder. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/ornithe/OrnitheInstallTask.java | New install task that builds an Ornithe patch from launcher meta. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/legacyfabric/LegacyFabricInstallTask.java | Update to FabricInfo record accessors. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/fabric/FabricInstallTask.java | Convert FabricInfo to a record. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/MojangDownloadProvider.java | Register ornithe / ornithe-osl version lists. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/LibraryAnalyzer.java | Add ORNITHE(+OSL) detection and expose detected libraries/modloaders. |
| HMCLCore/src/main/java/org/jackhuang/hmcl/download/BMCLAPIDownloadProvider.java | Register ornithe / ornithe-osl version lists. |
| HMCL/src/main/resources/assets/lang/I18N.properties | Add installer labels + update tooltips/messages; adjust custom-commands env hint. |
| HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties | Add installer labels + update tooltips/messages; adjust custom-commands env hint. |
| HMCL/src/main/resources/assets/lang/I18N_zh.properties | Add installer labels + update tooltips/messages; adjust custom-commands env hint. |
| HMCL/src/main/resources/assets/lang/I18N_uk.properties | Update tooltips/messages; remove old custom-commands env hint block. |
| HMCL/src/main/resources/assets/lang/I18N_ru.properties | Update tooltips/messages; remove old custom-commands env hint block. |
| HMCL/src/main/resources/assets/lang/I18N_lzh.properties | Remove old custom-commands env hint block. |
| HMCL/src/main/resources/assets/lang/I18N_ja.properties | Remove old custom-commands env hint block. |
| HMCL/src/main/resources/assets/lang/I18N_es.properties | Update tooltips/messages; remove old custom-commands env hint block. |
| HMCL/src/main/resources/assets/lang/I18N_ar.properties | Remove old custom-commands env hint block. |
| HMCL/src/main/resources/assets/img/ornithe.png | Add Ornithe icon (1x). |
| HMCL/src/main/resources/assets/img/ornithe@2x.png | Add Ornithe icon (2x). |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionIconDialog.java | Add Ornithe to icon picker list. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java | Display Ornithe loader tags/warnings in mod info UI. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java | Extend supported loader detection for mods page. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/InstallerListPage.java | Skip displaying Ornithe OSL in installed-libraries list. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AdvancedVersionSettingPage.java | Generate custom-commands env hint lines dynamically per modloader. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/download/VersionsPage.java | Map Ornithe remote versions to Ornithe icon type. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/download/InstallersPage.java | Add Ornithe to display name mapping. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/download/AbstractInstallersPage.java | Include Ornithe OSL in “API tip” gating logic. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TaskListPane.java | Name Ornithe install tasks and stage labels in task UI. |
| HMCL/src/main/java/org/jackhuang/hmcl/ui/InstallerItem.java | Add Ornithe (+OSL) installer items and incompatibility rules. |
| HMCL/src/main/java/org/jackhuang/hmcl/setting/VersionIconType.java | Add ORNITHE icon type. |
| HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java | Return Ornithe icon for Ornithe instances. |
| HMCL/image/ornithe.png | Add source image asset for Ornithe icon. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public void execute() throws IOException { | ||
| OrnitheInfo ornitheInfo = JsonUtils.GSON.fromJson(launchMetaTask.getResult(), OrnitheInfo.class); | ||
| if (ornitheInfo == null) | ||
| throw new IOException("Fabric metadata is invalid"); |
There was a problem hiding this comment.
The error message says "Fabric metadata is invalid" even though this is Ornithe installation metadata. Update the message to reference Ornithe to make troubleshooting clearer.
| throw new IOException("Fabric metadata is invalid"); | |
| throw new IOException("Ornithe metadata is invalid"); |
| ## 简介 | ||
|
|
||
| HMCL 是一款开源、跨平台的 Minecraft 启动器,支持模组管理、游戏自定义、游戏自动安装 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Quilt、LiteLoader 和 OptiFine)、整合包创建、界面自定义等功能。 | ||
| HMCL 是一款开源、跨平台的 Minecraft 启动器,支持模组管理、游戏自定义、游戏自动安装 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Ornithe、 Quilt、LiteLoader 和 OptiFine)、整合包创建、界面自定义等功能。 |
There was a problem hiding this comment.
There’s an extra space after the Chinese comma in "Ornithe、 Quilt". Remove the stray space to keep punctuation/spacing consistent in the loader list.
| ## 簡介 | ||
|
|
||
| HMCL 是一款開源、跨平臺的 Minecraft 啟動器,支援模組管理、遊戲客製化、遊戲自動安裝 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Quilt、LiteLoader 和 OptiFine)、模組包建立、介面客製化等功能。 | ||
| HMCL 是一款開源、跨平臺的 Minecraft 啟動器,支援模組管理、遊戲客製化、遊戲自動安裝 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Ornithe、 Quilt、LiteLoader 和 OptiFine)、模組包建立、介面客製化等功能。 |
There was a problem hiding this comment.
There’s an extra space after the punctuation in "Ornithe、 Quilt". Remove the stray space to keep the loader list formatting consistent.
| ORNITHE(true, "ornithe", "net\\.fabricmc", "fabric-loader", ModLoaderType.ORNITHE) { | ||
| @Override | ||
| protected boolean matchLibrary(Library library, List<Library> libraries) { | ||
| if (!super.matchLibrary(library, libraries)) { | ||
| return false; | ||
| } | ||
| for (Library l : libraries) { | ||
| if ("net.ornithemc".equals(l.getGroupId())) { | ||
| return false; | ||
| } | ||
| } | ||
| return true; | ||
| } |
There was a problem hiding this comment.
LibraryType.ORNITHE.matchLibrary currently returns false when it detects any net.ornithemc library in the version. If Ornithe installations include net.ornithemc artifacts (which is expected), this prevents ORNITHE from ever being detected and will likely misclassify it as FABRIC. Reverse this logic so the presence of net.ornithemc libs is treated as the Ornithe signal (and/or explicitly exclude Ornithe from FABRIC detection).
| \ · $INST_LEGACYFABRIC: set if Legacy Fabric is installed.\n\ | ||
| \ · $INST_QUILT: set if Quilt is installed. | ||
| \ · $INST_JAVA: java binary used for launch. | ||
| settings.advanced.custon_commands.env= \ · $INST_%s: set if %s is installed.; |
There was a problem hiding this comment.
This English string ends with a full-width Chinese semicolon ";", which looks like a copy/paste artifact and will render oddly in UI. Replace it with standard ASCII punctuation (or remove trailing punctuation to match the other bullet lines).
| settings.advanced.custon_commands.env= \ · $INST_%s: set if %s is installed.; | |
| settings.advanced.custon_commands.env= \ · $INST_%s: set if %s is installed. |
| for (LibraryAnalyzer.LibraryType type : analyzer.getLibraries()) { | ||
| if (type.isModLoader() && !(type == OPTIFINE)) continue; | ||
| if (type == MINECRAFT) addons.add(new McbbsModpackManifest.Addon(MINECRAFT.getPatchId(), gameVersion)); | ||
| else addons.add(new McbbsModpackManifest.Addon(type.getPatchId(), analyzer.getVersion(type).orElseThrow())); | ||
| } |
There was a problem hiding this comment.
The new loop skips almost all mod loaders due to the condition if (type.isModLoader() && !(type == OPTIFINE)) continue;, so Forge/Fabric/Quilt/etc. won’t be added to the Mcbbs manifest addons. In addition, MINECRAFT is added twice (before the loop and again when type == MINECRAFT). Adjust the filter logic to include the intended loader types and ensure Minecraft is only added once.
| } | ||
|
|
||
| if (analyzer.has(LibraryAnalyzer.LibraryType.ORNITHE)) { | ||
| supportedLoaders.add(ModLoaderType.FABRIC); |
There was a problem hiding this comment.
When ORNITHE is present, this adds ModLoaderType.FABRIC instead of ModLoaderType.ORNITHE, so mod filtering/tagging will be wrong for Ornithe instances. Add the Ornithe loader type here.
| supportedLoaders.add(ModLoaderType.FABRIC); | |
| supportedLoaders.add(ModLoaderType.ORNITHE); |
| for (ModLoaderType type : ModLoaderType.values()) { | ||
| if (type.getId() != null) { | ||
| sb.append("\n"); | ||
| sb.append(i18n("settings.advanced.custon_commands.env",type.getId(),i18n("install.installer." + type.getId().toLowerCase(Locale.ROOT)))); |
There was a problem hiding this comment.
The i18n key name settings.advanced.custon_commands.env appears to have a typo (“custon” vs “custom”). Since this is newly introduced, consider renaming it (and the corresponding properties entries) now to avoid propagating the misspelling across locales and future references.
| sb.append(i18n("settings.advanced.custon_commands.env",type.getId(),i18n("install.installer." + type.getId().toLowerCase(Locale.ROOT)))); | |
| sb.append(i18n("settings.advanced.custom_commands.env", type.getId(), i18n("install.installer." + type.getId().toLowerCase(Locale.ROOT)))); |
| return Task.runAsync(() -> { | ||
| for (RemoteMod.Version modVersion : Lang.toIterable(ModrinthRemoteModRepository.MODS.getRemoteVersionsById(downloadProvider, "EHGtwpJv"))) { | ||
| for (String gameVersion : modVersion.getGameVersions()) { | ||
| versions.put(gameVersion, new OrnitheOSLRemoteVersion(gameVersion, modVersion.getVersion(), modVersion.getName(), modVersion.getDatePublished(), modVersion, | ||
| Collections.singletonList(modVersion.getFile().getUrl()))); | ||
| } | ||
| } |
There was a problem hiding this comment.
This refresh implementation writes to versions without acquiring lock.writeLock() and never clears the existing map, unlike other VersionList implementations. This can cause data races and stale/duplicated entries. Wrap updates in the write lock and clear versions before repopulating.
| public int compareTo(RemoteVersion o) { | ||
| if (!(o instanceof OrnitheOSLRemoteVersion)) return 0; | ||
| return -this.getReleaseDate().compareTo(o.getReleaseDate()); | ||
| } |
There was a problem hiding this comment.
compareTo returns 0 for non-OrnitheOSLRemoteVersion instances, which violates the Comparable contract and can break sorting in TreeSet. It also assumes getReleaseDate() is non-null. Consider delegating to super.compareTo(o) for other types and handling null release dates safely.