Conversation
在BMC4中测试时发现BMC4会判定所有资源包兼容,与原版表现不符,会导致启用/禁用功能失效,故添加警告
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
…esourcepack-enhancement
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/download/DownloadPage.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/AddonCheckUpdatesTask.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPage.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ModListPageSkin.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ResourcepackListPage.java # HMCLCore/src/main/java/org/jackhuang/hmcl/mod/LocalModFile.java # HMCLCore/src/main/java/org/jackhuang/hmcl/resourcepack/ResourcepackFile.java # HMCLCore/src/main/java/org/jackhuang/hmcl/resourcepack/ResourcepackFolder.java # HMCLCore/src/main/java/org/jackhuang/hmcl/resourcepack/ResourcepackZipFile.java
已移除这个界面的这个标签。 但我保留了详细信息界面的这个标签,已表示我们确实会检测兼容性而非什么都不管。 |
我认为这种信息完全没有意义,模组管理页面也不会显示这种没有意义的东西。 |
removed |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5821e3600
ℹ️ 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".
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ResourcePackListPage.java
Outdated
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a significant refactoring of the addon management system, establishing a generic base for both mods and resource packs through the LocalAddonFile and LocalAddonManager classes. It replaces the previous resource pack implementation with a more robust system that includes detailed compatibility checks based on PackMcMeta and unified update logic. Review feedback highlights opportunities to improve robustness by logging failures during file deletion, providing user-facing error messages when directory creation fails, and optimizing performance by batching configuration file writes during bulk operations.
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ResourcePackListPage.java
Outdated
Show resolved
Hide resolved
HMCLCore/src/main/java/org/jackhuang/hmcl/resourcepack/ResourcePackManager.java
Outdated
Show resolved
Hide resolved
|
碎碎念几句。 回顾来看,当时的「撤回」感觉操之过急。 尤其是合并后又突然评论「光顾着看代码了」「合并之后发现还是有很多问题」,给 PR 作者、其他活跃贡献者以及普通用户的观感并不太好。而且撤回理由也很含糊——看到了 mineDiamond 的评论才让人大致明白撤回的一个「动机」。 而且 force push 也不是一个可以随意在默认分支/主分支使用的操作——尤其是对于知名的、有多人协作的项目。这个 PR 也不涉及隐私啥的,哪怕再提交一个 revert commit 也好过 force push。直接 force push,让之前的 PR 看起来「合并」了,但却没有出现在 commit history 中,给其他查阅 commit / issue / PR 的用户带来了困惑和不解。 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the addon management system by introducing a unified hierarchy for mods and resource packs through the LocalAddonManager and LocalAddonFile classes. It replaces the previous resource pack implementation with a more robust system that includes compatibility checking and update support for CurseForge and Modrinth. The UI has been updated to use generic components for addon updates and downloads. Review feedback suggests improving the UI by displaying filenames instead of full paths in error dialogs and ensuring consistency by using utility methods for zip file operations.
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/ResourcePackListPage.java
Show resolved
Hide resolved
| return i == 0 ? PackMcMeta.PackVersion.UNSPECIFIED : new PackMcMeta.PackVersion(i, 0); | ||
| } | ||
| } | ||
| try (var zipFileTree = new ZipFileTree(CompressingUtils.openZipFile(gameJar))) { |
There was a problem hiding this comment.
For consistency with other parts of the resource pack management code (e.g., ResourcePackZipFile), consider using the CompressingUtils.openZipTree utility method here.
| try (var zipFileTree = new ZipFileTree(CompressingUtils.openZipFile(gameJar))) { | |
| try (var zipFileTree = CompressingUtils.openZipTree(gameJar)) { |
|
又看了看 Glavo 给的图,我产生了一种微妙的感觉。 一个资源包条目的两行文字中,除了扩展名以外,两行文字一模一样。 既然目前第一行确定是显示资源包的文件名,那么可以把第二行改成显示 |



具体改动
LocalAddonFile和LocalFileManager<T extends LocalAddonFile>,使更新对于模组以外的东西(如资源包和光影包)也能适用,从而实现了资源包更新(不保留旧版本)See #4980