Skip to content

Conversation

@Wulian233
Copy link
Contributor

@Wulian233 Wulian233 commented Jan 11, 2026

Close #2178 #5164

经过实测,仅 Forge Quilt 支持识别子文件夹(Neoforge 和 Fabric 不支持)。原有代码额外判断 Forge 下是否为版本号才识别,但实测文件夹可为任意名称(同样见 #5164 截图)

另外,实际支持多次嵌套模组识别加载,目前 PR 只会识别一层,我打算把它作为特性保留

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

This PR updates mod manager logic to allow Forge and Quilt mod loaders to recognize mods in subdirectories with any name, not just version number names. Based on testing, only Forge and Quilt support this feature, while NeoForge and Fabric do not.

Changes:

  • Simplified subdirectory recognition for Forge and Quilt to accept any folder name instead of only version numbers
  • Removed unused VersionNumber import

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

localMods.clear();

analyzer = LibraryAnalyzer.analyze(getRepository().getResolvedPreservingPatchesVersion(id), null);

Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

Consider adding a comment to explain that only Forge and Quilt mod loaders support loading mods from subdirectories within the mods folder, while NeoForge and Fabric do not support this feature. This would help future maintainers understand the rationale for this specific check.

Suggested change
// Only Forge and Quilt support loading mods from subdirectories within the mods folder.
// NeoForge and Fabric currently require mods to be in the root of the mods directory.

Copilot uses AI. Check for mistakes.
@Glavo Glavo merged commit 370d0ce into HMCL-dev:main Jan 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature/Suggestion] 模组管理菜单支持文件夹

2 participants