Skip to content

feat: Ornithe 自动安装#5875

Open
CiiLu wants to merge 28 commits intoHMCL-dev:mainfrom
CiiLu:ornithe
Open

feat: Ornithe 自动安装#5875
CiiLu wants to merge 28 commits intoHMCL-dev:mainfrom
CiiLu:ornithe

Conversation

@CiiLu
Copy link
Copy Markdown
Contributor

@CiiLu CiiLu commented Mar 29, 2026

image

CiiLu added 23 commits March 29, 2026 09:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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");
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
throw new IOException("Fabric metadata is invalid");
throw new IOException("Ornithe metadata is invalid");

Copilot uses AI. Check for mistakes.
Comment thread docs/README_zh.md Outdated
## 简介

HMCL 是一款开源、跨平台的 Minecraft 启动器,支持模组管理、游戏自定义、游戏自动安装 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Quilt、LiteLoader 和 OptiFine)、整合包创建、界面自定义等功能。
HMCL 是一款开源、跨平台的 Minecraft 启动器,支持模组管理、游戏自定义、游戏自动安装 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Ornithe、 Quilt、LiteLoader 和 OptiFine)、整合包创建、界面自定义等功能。
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread docs/README_zh_Hant.md Outdated
## 簡介

HMCL 是一款開源、跨平臺的 Minecraft 啟動器,支援模組管理、遊戲客製化、遊戲自動安裝 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Quilt、LiteLoader 和 OptiFine)、模組包建立、介面客製化等功能。
HMCL 是一款開源、跨平臺的 Minecraft 啟動器,支援模組管理、遊戲客製化、遊戲自動安裝 (Forge、NeoForge、Cleanroom、Fabric、Legacy Fabric、Ornithe、 Quilt、LiteLoader 和 OptiFine)、模組包建立、介面客製化等功能。
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

There’s an extra space after the punctuation in "Ornithe、 Quilt". Remove the stray space to keep the loader list formatting consistent.

Copilot uses AI. Check for mistakes.
Comment on lines +229 to +241
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;
}
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment thread HMCL/src/main/resources/assets/lang/I18N.properties Outdated
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AdvancedVersionSettingPage.java Outdated
@Glavo
Copy link
Copy Markdown
Member

Glavo commented Apr 17, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 821aaa0ca8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread HMCLCore/src/main/java/org/jackhuang/hmcl/mod/mcbbs/McbbsModpackExportTask.java Outdated
@3gf8jv4dv
Copy link
Copy Markdown
Contributor

前段时间简单测试过,问题看起来不少。之后我找时间写个详细的报告。

@Glavo
Copy link
Copy Markdown
Member

Glavo commented Apr 23, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for the Ornithe mod loader and Ornithe OSL across the launcher. Changes include new installation tasks, version list providers, UI integration for installer items and icons, and updated I18N strings. The review feedback identifies several critical issues: a logic reversal in the library analyzer that prevents Ornithe detection, incorrect usage of the task dependency system in installation tasks, and a typo in a localized key. Additionally, there is a concern regarding the generation of version lists which could lead to UI performance issues.

Comment thread HMCLCore/src/main/java/org/jackhuang/hmcl/download/LibraryAnalyzer.java Outdated
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AdvancedVersionSettingPage.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants