HMCL icon indicating copy to clipboard operation
HMCL copied to clipboard

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

Open zkitefly opened this issue 9 months ago • 3 comments

平台 | Platform

问题描述 | Problem Description

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

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

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

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

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

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

zkitefly avatar May 05 '24 05:05 zkitefly

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

burningtnt avatar May 05 '24 06:05 burningtnt

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

image

zkitefly avatar May 05 '24 06:05 zkitefly

https://github.com/HMCL-dev/HMCL/blob/df953e5ea7ed1c349c7172045d7228414d2ecf4f/HMCLCore/src/main/java/org/jackhuang/hmcl/game/DefaultGameRepository.java#L461

https://github.com/HMCL-dev/HMCL/blob/df953e5ea7ed1c349c7172045d7228414d2ecf4f/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/VersionPage.java#L169

改成游戏目录就行

zkitefly avatar May 05 '24 06:05 zkitefly