Skip to content

Conversation

@Calboot
Copy link
Contributor

@Calboot Calboot commented Dec 14, 2025

具体改动

  • 修复了资源包管理界面元素边框过粗的问题
  • 修复资源包依赖模组下载错误的问题
  • 修复光影包下载对话框标题错误的问题
  • 添加启用/禁用资源包功能(实验性,有警告)
  • 添加资源包详细信息界面
  • 移除资源包删除按钮,改为与模组界面一致的删除逻辑
  • Fixes [Bug] 实例管理-资源包管理 页面有概率无法用esc退回到主界面 #5037
  • 从一些类里抽象出LocalAddonFileLocalFileManager<T extends LocalAddonFile>,使更新对于模组以外的东西(如资源包和光影包)也能适用,从而实现了资源包更新(不保留旧版本)
  • 让资源包光影包下载也有推荐项

@Calboot
Copy link
Contributor Author

Calboot commented Dec 14, 2025

需要懂其他语言的人完善 i18n

@Calboot Calboot changed the title [Enhancement] 资源包有关优化与修复 [Enhancement] [Bugfix] 资源包有关优化与修复 Dec 14, 2025
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.

我在 CF 和 MR 分别下载了好几个资源包,结果都显示「游戏版本元数据缺失」。如果真的要为这个显示警告的话,可能很多人都会迷惑。

可能是我搞错了,我还在弄清楚这一块。

@3gf8jv4dv
Copy link
Contributor

我下载了 Translations for Sodium,放在 1.21.9~1.21.11 的资源包文件夹内,启动器会显示「游戏版本元数据缺失」。1.21.8 和 1.21.1 正常。不知道是不是 bug。

Calboot and others added 2 commits December 17, 2025 21:28
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
@Calboot
Copy link
Contributor Author

Calboot commented Dec 17, 2025

我下载了 Translations for Sodium,放在 1.21.9~1.21.11 的资源包文件夹内,启动器会显示「游戏版本元数据缺失」。1.21.8 和 1.21.1 正常。不知道是不是 bug。

确实是,我在修

@Calboot
Copy link
Contributor Author

Calboot commented Dec 18, 2025

我下载了 Translations for Sodium,放在 1.21.9~1.21.11 的资源包文件夹内,启动器会显示「游戏版本元数据缺失」。1.21.8 和 1.21.1 正常。不知道是不是 bug。

Solved

@Calboot Calboot marked this pull request as ready for review December 18, 2025 14:53
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

Copilot reviewed 43 out of 43 changed files in this pull request and generated 11 comments.

Comments suppressed due to low confidence (3)

HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/UpdatesPage.java:215

  • The switch statement at lines 209-215 is missing a default case. While the current RemoteMod.Type enum only has CURSEFORGE and MODRINTH, if new types are added in the future, this code will silently fail to set the source. Consider adding a default case to handle unknown types gracefully or log a warning.
    HMCLCore/src/main/java/org/jackhuang/hmcl/mod/LocalModFile.java:164
  • This method overrides LocalFile.setOld; it is advisable to add an Override annotation.
    public void setOld(boolean old) throws IOException {

HMCLCore/src/main/java/org/jackhuang/hmcl/mod/LocalModFile.java:103

  • This method overrides LocalFile.getFile; it is advisable to add an Override annotation.
    public Path getFile() {

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

resourcepack.download.title=资源包下载 - %1s
resourcepack.manage=资源包管理
resourcepack.warning.invalid=资源包元数据无效
resourcepack.warning.manipulate=资源包的加载可能会受到模组干扰,导致运行效果异常。\n你确定要启用或禁用此资源包吗?
Copy link
Member

Choose a reason for hiding this comment

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

这句描述看起来非常奇怪。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

改了一下,现在呢?

Copy link
Member

Choose a reason for hiding this comment

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

现在这个文件不是只代表一个 mod 了吧?我觉得可以改名成 RemoteAddon 之类的东西。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这改动有点大吧...?

Copy link
Contributor Author

@Calboot Calboot Dec 26, 2025

Choose a reason for hiding this comment

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

我觉得还是不要动了,这个类太重要了

Copy link
Contributor Author

@Calboot Calboot Dec 28, 2025

Choose a reason for hiding this comment

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

如果要改的话,不如顺便把包名改成org.jackhuang.hmcl.addon然后底下把pack mod modpack以及将来的shader都分成单独的包

@3gf8jv4dv
Copy link
Contributor

资源包是否被被启用的判定很大程度上会受到模组影响,本来就是仅供参考的。我不太希望对游戏的资源包列表有太多更改,更改越多bug就可能越多

比如说,如果一个不兼容的资源包在已加载资源包的列表里且不在不兼容列表里,那我们如何显示它的位置?

以及这样会导致列表很混乱

而且本来就是后启用的在上面吧(

对于这一点,是否需要在资源包管理页面放个提示框之类的,声明一下?

@Calboot
Copy link
Contributor Author

Calboot commented Dec 26, 2025

对于这一点,是否需要在资源包管理页面放个提示框之类的,声明一下?

用户在尝试启用/禁用资源包的时候会弹提示的,虽然只弹一次但是会给5s阅读时间

@Calboot Calboot requested a review from Glavo December 27, 2025 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants