Skip to content

[Feature] 让HMCL可以识别到JIJ的打包形式并以FlowPane的形式显示,并支持搜索和导出JIJ信息,且在崩溃时若有JIJ信息则一并打包至压缩包内#5383

Open
NoClassFoundError wants to merge 38 commits intoHMCL-dev:mainfrom
NoClassFoundError:5332JIJ

Conversation

@NoClassFoundError
Copy link
Contributor

No description provided.

@NoClassFoundError
Copy link
Contributor Author

#5332

@Minecraft269
Copy link

Minecraft269 commented Jan 31, 2026

下载 来源
image
image
image
wtf?

@Minecraft269
Copy link

为什么不能像这样呢?

@NoClassFoundError
Copy link
Contributor Author

@3gf8jv4dv 请求进行i18n补全,我这里打开zh全是乱码

@NoClassFoundError
Copy link
Contributor Author

参考译文:
mods.built_in=Built-in
内置
mods.built_in.cancleexport=No mod contains JIJ information, the operation will be canceled.
无JIJ信息包含,操作将取消。
mods.built_in.exportJIJINFO=Export The JIJ INFO
导出JIJ信息
mods.built_in.exportAllJIJINFO=Export All JIJ INFO
导出所有JIJ信息
mods.built_in.mods=Built-in Mods
内置模组
mods.built_in.noresult=No matching results
没有匹配结果
mods.built_in.search=Search Built-in Mods
搜索内置模组
若翻译有误请见谅,感谢。

@3gf8jv4dv
Copy link
Contributor

@3gf8jv4dv 请求进行i18n补全,我这里打开zh全是乱码

zh 是仅繁体还是简繁?按理说不应该呀。所有 i18n 文件都是 UTF-8 编码。

@NoClassFoundError
Copy link
Contributor Author

@3gf8jv4dv 请求进行i18n补全,我这里打开zh全是乱码

zh 是仅繁体还是简繁?按理说不应该呀。所有 i18n 文件都是 UTF-8 编码。

我这里全是ISO

@NoClassFoundError
Copy link
Contributor Author

image

@3gf8jv4dv
Copy link
Contributor

@NoClassFoundError 这个编辑器的设置应该能改,你可以搜一下。我看下译文。

@NoClassFoundError
Copy link
Contributor Author

好的,等我回去研究一下

@Damselettecolumbiahyperseleneia

cc @3gf8jv4dv

@Damselettecolumbiahyperseleneia

cc @3gf8jv4dv

Copy link
Contributor

@3gf8jv4dv 3gf8jv4dv left a comment

Choose a reason for hiding this comment

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

lgtm 💃🕺

Copy link
Contributor

@WhatDamon WhatDamon left a comment

Choose a reason for hiding this comment

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

粗略看了一下,本地化似乎还是有点问题

Copy link

Choose a reason for hiding this comment

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

修改已完成

Copy link
Contributor

@3gf8jv4dv 3gf8jv4dv left a comment

Choose a reason for hiding this comment

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

我们来看看 Glavo 怎么说。

@NoClassFoundError NoClassFoundError marked this pull request as ready for review February 3, 2026 13:15
@3gf8jv4dv
Copy link
Contributor

前面已经解决的评论,请点击 Resolve Conversation


extension.bat=Windows Batch File
extension.file=Text documents
extension.mod=Mod File
Copy link
Contributor

Choose a reason for hiding this comment

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

这个下面已经有了,重复了。

Copy link
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

该 PR 为 HMCL 增加对 Mod Jar-in-Jar(JiJ / nested jars)信息的识别、展示、搜索与导出能力,并在导出崩溃日志压缩包时附带 JiJ 信息清单,便于排障与信息收集。

Changes:

  • 在 Fabric / Quilt / Forge(1.13+) 元数据解析中提取 JiJ(nested jars / jarjar)列表并写入 LocalModFile
  • 新增“嵌套模组管理”页面(FlowPane 弹窗展示、支持搜索与导出 JiJ 信息)并挂到版本管理侧边栏
  • 崩溃日志导出时额外打包 mod 列表与 JiJ 信息(ALL_MOD_JIJ_INFO.txt

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/QuiltModMetadata.java 解析 quilt.mod.json 中的 nested jars 列表并传入 LocalModFile
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/PackMcMeta.java 适配 LocalModFile 新增的 bundledMods 参数(空列表)
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/LiteModMetadata.java 同上,补齐 bundledMods 参数(空列表)
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/ForgeOldModMetadata.java 同上,补齐 bundledMods 参数(空列表)
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/ForgeNewModMetadata.java 解析 META-INF/jarjar/metadata.json 并写入 bundledMods
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modinfo/FabricModMetadata.java 解析 fabric.mod.json 的 jars 字段并写入 bundledMods
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/LocalModFile.java 为每个 mod file 增加 bundledMods 存储与查询接口
HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties 新增嵌套模组管理相关文案与文件类型文案
HMCL/src/main/resources/assets/lang/I18N_zh.properties 同上(繁体)
HMCL/src/main/resources/assets/lang/I18N.properties 同上(英文)
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionPage.java 侧边栏新增“嵌套模组管理”入口与折叠交互
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/BuiltInModListPageSkin.java 新增页面皮肤:展示/搜索/导出 JiJ 信息
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/BuiltInModListPage.java 新增页面逻辑:拉取包含 JiJ 的 mod 列表
HMCL/src/main/java/org/jackhuang/hmcl/ui/SVG.java 新增导出与 stacks 图标以支持新 UI
HMCL/src/main/java/org/jackhuang/hmcl/game/LogExporter.java 崩溃日志压缩包中附带 mod 列表与 JiJ 信息文件

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

if (!hasJij) {
infoBuilder.append("No JIJ INFO contain").append(System.lineSeparator());
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The fallback message No JIJ INFO contain is grammatically incorrect and may be confusing in the exported report. Consider changing it to something clearer like “No JiJ info found.”

Suggested change
infoBuilder.append("No JIJ INFO contain").append(System.lineSeparator());
infoBuilder.append("No JiJ info found.").append(System.lineSeparator());

Copilot uses AI. Check for mistakes.
mods.add.failed=Failed to add mod %s.
mods.add.success=%s was successfully added.
mods.built_in=Nested
mods.built_in.cancleexport=No mod contains JiJ information. The operation will be canceled.
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The i18n key name mods.built_in.cancleexport contains a typo (“cancle”). Since this key is referenced from code, it’s easy for the typo to spread and makes future maintenance harder. Consider renaming it to mods.built_in.cancel_export (or similar) and updating all locale files + code references accordingly.

Suggested change
mods.built_in.cancleexport=No mod contains JiJ information. The operation will be canceled.
mods.built_in.cancel_export=No mod contains JiJ information. The operation will be canceled.

Copilot uses AI. Check for mistakes.
Comment on lines 81 to 82
tab = new TabHeader(transitionPane, versionSettingsTab, installerListTab, modListTab,builtInModListTab, resourcePackTab, worldListTab, schematicsTab);
tab.select(versionSettingsTab);
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

Missing space after comma in the TabHeader constructor call (modListTab,builtInModListTab). This is inconsistent with the formatting used elsewhere in the file and makes the argument list harder to scan.

Copilot uses AI. Check for mistakes.
this.gameVersion = gameVersion;
this.url = url;
this.logoPath = logoPath;
this.bundledMods = bundledMods;
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

bundledMods is stored as-is and can be null or externally mutable. Consider normalizing it in the constructor (e.g., default to an empty list when null and store an unmodifiable/defensive copy) so callers can safely use getBundledMods() without repeated null/immutability checks.

Suggested change
this.bundledMods = bundledMods;
List<String> safeBundledMods = bundledMods == null
? Collections.emptyList()
: Collections.unmodifiableList(new ArrayList<>(bundledMods));
this.bundledMods = safeBundledMods;

Copilot uses AI. Check for mistakes.
Comment on lines 54 to 55
public FabricModMetadata(String id, String name, String version, String icon, String description, List<FabricModAuthor> authors, Map<String, String> contact,List<FabricNestedJar> jars) {
this.id = id;
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

Constructor parameter list is missing a space after the comma (contact,List...), which is inconsistent with the surrounding style and hurts readability.

Copilot uses AI. Check for mistakes.
Comment on lines +156 to +160
private void search() {
isSearching = true;
Bindings.unbindContent(listView.getItems(), getSkinnable().getItems());

String queryString = searchField.getText();
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

isSearching is set in search() and reset when closing the search bar, but it is never read, and the ListView is unbound from getSkinnable().getItems() during search. This means a refresh() (or any async update to getItems()) won’t update the visible results while searching. Consider either removing isSearching and keeping the binding, or adding an items-change listener (similar to ModListPageSkin) that re-runs search() when getSkinnable().getItems() changes while searching.

Copilot uses AI. Check for mistakes.
}

if (!hasData) {
FXUtils.runInFX(() -> Controllers.confirm(i18n("mods.built_in.cancleexport"), i18n("button.ok"), () -> {}, null));
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

This uses Controllers.confirm(...), which renders a Yes/No dialog, but the UI text/action suggests this is an informational “OK only” message when there is no JiJ data to export. Consider using Controllers.dialog(...) (or another one-button dialog API) instead of confirm here.

Suggested change
FXUtils.runInFX(() -> Controllers.confirm(i18n("mods.built_in.cancleexport"), i18n("button.ok"), () -> {}, null));
FXUtils.runInFX(() -> Controllers.dialog(i18n("mods.built_in.cancleexport")));

Copilot uses AI. Check for mistakes.
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.

5 participants