[Feature] 让HMCL可以识别到JIJ的打包形式并以FlowPane的形式显示,并支持搜索和导出JIJ信息,且在崩溃时若有JIJ信息则一并打包至压缩包内#5383
[Feature] 让HMCL可以识别到JIJ的打包形式并以FlowPane的形式显示,并支持搜索和导出JIJ信息,且在崩溃时若有JIJ信息则一并打包至压缩包内#5383NoClassFoundError wants to merge 38 commits intoHMCL-dev:mainfrom
Conversation
|
为什么不能像这样呢? |
|
@3gf8jv4dv 请求进行i18n补全,我这里打开zh全是乱码 |
|
参考译文: |
zh 是仅繁体还是简繁?按理说不应该呀。所有 i18n 文件都是 UTF-8 编码。 |
我这里全是ISO |
|
@NoClassFoundError 这个编辑器的设置应该能改,你可以搜一下。我看下译文。 |
|
好的,等我回去研究一下 |
|
cc @3gf8jv4dv |
|
cc @3gf8jv4dv |
|
前面已经解决的评论,请点击 Resolve Conversation |
|
|
||
| extension.bat=Windows Batch File | ||
| extension.file=Text documents | ||
| extension.mod=Mod File |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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.”
| infoBuilder.append("No JIJ INFO contain").append(System.lineSeparator()); | |
| infoBuilder.append("No JiJ info found.").append(System.lineSeparator()); |
| 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. |
There was a problem hiding this comment.
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.
| 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. |
| tab = new TabHeader(transitionPane, versionSettingsTab, installerListTab, modListTab,builtInModListTab, resourcePackTab, worldListTab, schematicsTab); | ||
| tab.select(versionSettingsTab); |
There was a problem hiding this comment.
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.
| this.gameVersion = gameVersion; | ||
| this.url = url; | ||
| this.logoPath = logoPath; | ||
| this.bundledMods = bundledMods; |
There was a problem hiding this comment.
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.
| this.bundledMods = bundledMods; | |
| List<String> safeBundledMods = bundledMods == null | |
| ? Collections.emptyList() | |
| : Collections.unmodifiableList(new ArrayList<>(bundledMods)); | |
| this.bundledMods = safeBundledMods; |
| 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; |
There was a problem hiding this comment.
Constructor parameter list is missing a space after the comma (contact,List...), which is inconsistent with the surrounding style and hurts readability.
| private void search() { | ||
| isSearching = true; | ||
| Bindings.unbindContent(listView.getItems(), getSkinnable().getItems()); | ||
|
|
||
| String queryString = searchField.getText(); |
There was a problem hiding this comment.
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.
| } | ||
|
|
||
| if (!hasData) { | ||
| FXUtils.runInFX(() -> Controllers.confirm(i18n("mods.built_in.cancleexport"), i18n("button.ok"), () -> {}, null)); |
There was a problem hiding this comment.
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.
| FXUtils.runInFX(() -> Controllers.confirm(i18n("mods.built_in.cancleexport"), i18n("button.ok"), () -> {}, null)); | |
| FXUtils.runInFX(() -> Controllers.dialog(i18n("mods.built_in.cancleexport"))); |




No description provided.