Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] resources 目录应该跟随游戏目录 #3026

Open
zkitefly opened this issue May 5, 2024 · 3 comments · May be fixed by #3027
Open

[Bug] resources 目录应该跟随游戏目录 #3026

zkitefly opened this issue May 5, 2024 · 3 comments · May be fixed by #3027
Labels

Comments

@zkitefly
Copy link
Member

zkitefly commented May 5, 2024

平台 | Platform

问题描述 | Problem Description

目前 HMCL 只会在 .minecraft 根目录创建 resources 目录,而不是跟随游戏目录

这导致在启用各版本独立后启动游戏无声音

正确的做法是要在 游戏目录 中创建 resources 目录

我已测试全局/特定游戏设置中开关各版本独立设置,

  • 全局游戏设置
    • 开启各版本独立
      • 无声音,.minecraft 根目录中含有 resources 目录而游戏目录没有
    • 关闭各版本独立
      • 有声音,.minecraft 根目录中含有 resources 目录而游戏目录没有
  • 特定游戏设置
    • 开启各版本独立
      • 无声音,.minecraft 根目录中含有 resources 目录而游戏目录没有
    • 关闭各版本独立
      • 有声音,.minecraft 根目录中含有 resources 目录而游戏目录没有

启动器崩溃报告 / 启动器日志文件 | Launcher Crash Report / Launcher Log File

@zkitefly zkitefly added the bug label May 5, 2024
@burningtnt
Copy link
Member

是应当在版本 JSON 里含有
image
virtual == true 且 map_to_resources == true 时执行这些逻辑吗?

@zkitefly
Copy link
Member Author

zkitefly commented May 5, 2024

是应当在版本 JSON 里含有 ![image] virtual == true 且 map_to_resources == true 时执行这些逻辑吗?

image

@zkitefly
Copy link
Member Author

zkitefly commented May 5, 2024

Path resourcesDir = getBaseDirectory().toPath().resolve("resources");

FileUtils.deleteDirectoryQuietly(new File(baseDirectory, "resources"));

改成游戏目录就行

burningtnt added a commit to burningtnt/HMCL that referenced this issue May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants