Skip to content

Feat: Automatically create "mods" folders after installing - #3593

Closed
zkitefly wants to merge 5 commits into
HMCL-dev:mainfrom
zkitefly:aoto-creat
Closed

Feat: Automatically create "mods" folders after installing#3593
zkitefly wants to merge 5 commits into
HMCL-dev:mainfrom
zkitefly:aoto-creat

Conversation

@zkitefly

@zkitefly zkitefly commented Feb 7, 2025

Copy link
Copy Markdown
Member

No description provided.

@3gf8jv4dv 3gf8jv4dv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh god, you forgot NeoForge.

@burningtnt

Copy link
Copy Markdown
Member

你需要的东西叫做 isModded

…ge.java

Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>

@3gf8jv4dv 3gf8jv4dv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My fault :(

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/download/InstallersPage.java Outdated
…ge.java

Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
@zkitefly

Copy link
Copy Markdown
Member Author

@Glavo cc?

@Glavo Glavo changed the title Feat: Automatically create “mods" folders after installing Feat: Automatically create "mods" folders after installing Jul 28, 2025
# Conflicts:
#	HMCL/src/main/java/org/jackhuang/hmcl/ui/download/InstallersPage.java
}

private void createRequiredFolders(String versionName) {
for (InstallerItem library : group.getLibraries()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

请使用 LibraryAnalyzer 直接分析该版本从而决定该版本是否可以安装模组


LibraryAnalyzer.LibraryType libraryType = LibraryAnalyzer.LibraryType.fromPatchId(libraryId);
if (libraryType != null) {
java.io.File versionRoot = repository.getVersionRoot(versionName);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mod 文件和 version root 没有强关联,实际不应该在这创建这个文件夹。

@burningtnt

Copy link
Copy Markdown
Member

问题:安装的时候版本隔离设置可能和安装后不同,此时原先创建的 mods 文件夹会失效。本 PR 依然没有解决玩家找不到 mods 文件夹的问题

@burningtnt burningtnt closed this Jan 25, 2026
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.

4 participants