[Feature] 资源包管理 #4980 reforged reforged reforged#6091
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>
…ement # Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadPage.java
…ement # Conflicts: # HMCL/src/main/resources/assets/css/root.css # HMCLCore/src/main/java/org/jackhuang/hmcl/mod/ModManager.java # HMCLCore/src/main/java/org/jackhuang/hmcl/mod/curse/CurseAddon.java # HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modrinth/ModrinthRemoteModRepository.java
This reverts commit 21f4e50.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the addon management system by introducing the LocalAddonFile and LocalAddonManager base classes, unifying the handling of mods and resource packs. It replaces the legacy resource pack implementation with a more robust system that supports version compatibility checks, enabling/disabling packs via options.txt, and checking for updates from CurseForge and Modrinth. Key changes include genericized update tasks and UI pages, enhanced pack.mcmeta parsing, and centralized search query compilation. Review feedback identifies several improvement opportunities: providing localized names for background tasks to improve UX, ensuring thread safety for the localFiles collection in the new manager, and optimizing performance by caching resource pack states to avoid redundant disk I/O during list refreshes.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a unified addon management system by refactoring mod management into LocalAddonFile and LocalAddonManager base classes and implementing resource pack management. It adds new UI components for resource pack listing and updates, and refactors existing mod-related tasks to support these changes. The review highlights potential improvements regarding resource pack priority, compatibility logic bugs, thread-safety concerns in lazy initialization, and memory optimization for icon loading.
…ePackManager.java Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…/ResourcePackManager.java" This reverts commit 7834a1e.
累了,毁灭吧
LocalAddonFile和LocalFileManager<T extends LocalAddonFile>,使更新对于模组以外的东西(如资源包和光影包)也能适用,从而实现了资源包更新(不保留旧版本)See #5774