Skip to content

[Feature] 资源包管理 #4980 reforged reforged reforged#6091

Merged
Glavo merged 166 commits into
HMCL-dev:mainfrom
ToobLac:resourcepack-enhancement
May 20, 2026
Merged

[Feature] 资源包管理 #4980 reforged reforged reforged#6091
Glavo merged 166 commits into
HMCL-dev:mainfrom
ToobLac:resourcepack-enhancement

Conversation

@ToobLac
Copy link
Copy Markdown
Contributor

@ToobLac ToobLac commented May 16, 2026

累了,毁灭吧

See #5774

Calboot and others added 15 commits April 5, 2026 16:03
…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
@Glavo
Copy link
Copy Markdown
Member

Glavo commented May 18, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

ToobLac and others added 5 commits May 18, 2026 22:50
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Glavo
Copy link
Copy Markdown
Member

Glavo commented May 20, 2026

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

ToobLac and others added 4 commits May 20, 2026 20:17
…ePackManager.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…/ResourcePackManager.java"

This reverts commit 7834a1e.
@Glavo Glavo merged commit 880aab0 into HMCL-dev:main May 20, 2026
2 checks passed
@ToobLac ToobLac deleted the resourcepack-enhancement branch May 20, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants