HMCL-dev / HMCL

A Minecraft Launcher which is multi-functional, cross-platform and popular
https://hmcl.huangyuhui.net
GNU General Public License v3.0
7.02k stars 681 forks source link

[Bug] For mods that contain multiple loader metadata files at the same time, `Check for Updates` may result in mismatched releases #3091

Open 3gf8jv4dv opened 6 months ago

3gf8jv4dv commented 6 months ago

平台 | Platform

Windows 11

问题描述 | Problem Description

Using release-3.5.8 (release).

  1. Install a 1.20.6 Fabric instance
  2. Install relatively old versions of CreativeCore and AmbientSounds
  3. Trigger Check for Updates
  4. You will find that the former matches the correct release, and the latter matches the release for NeoForge

According to my comment at https://github.com/HMCL-dev/HMCL/issues/3048#issuecomment-2132564398, the problem should be strange behavior of developers during the build process. The former only contains the metadata files for the corresponding modloader, while the latter contains both. I tried Prism Launcher, which contains similar functionality, and it matched the corresponding releases correctly.

Can we follow https://github.com/HMCL-dev/HMCL/pull/3089 and revise the corresponding code logic?

Preview ![](https://github.com/HMCL-dev/HMCL/assets/158490944/3e0e864c-b1fa-4a36-9810-bea87e18a5de)

Thanks to TheWhiteDog9487 for discovering and mentioning this issue.

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

N/A

burningtnt commented 6 months ago

If the latest version support both Fabric and NeoForge, why can't HMCL update the mod to this version?

3gf8jv4dv commented 6 months ago

If the latest version support both Fabric and NeoForge, why can't HMCL update the mod to this version?

No, it is not supported. The developers released it in two files (Fabric and NeoForge).

3gf8jv4dv commented 6 months ago

I suddenly remembered that there are indeed developers who have implemented a release file to support multiple modloaders at the same time (such as the Serilum series and Zume), but this situation will not be discussed here, only traditional mods (the support of different modloaders reflects into a different file).

3gf8jv4dv commented 5 months ago

@burningtnt

Any ideas on this issue?

burningtnt commented 5 months ago

It's strange that HMCL seems not to have checked the mod loader type. It will take longer time.

burningtnt commented 5 months ago

Could you provide a screenshot on the local mod list page for mod AmbientSounds_FABRIC_v6.0.2_mc1.20.6.jar?

3gf8jv4dv commented 5 months ago

Could you provide a screenshot on the local mod list page for mod AmbientSounds_FABRIC_v6.0.2_mc1.20.6.jar?

@burningtnt

HMCL-dev@e0ecd5e, HMCL-dev/HMCL/actions/runs/9547498968

Preview ![](https://github.com/HMCL-dev/HMCL/assets/158490944/b291aabf-ebc2-490d-9b1a-10b131d1f017)
burningtnt commented 5 months ago

Could you provide a screenshot on the local mod list page for mod AmbientSounds_FABRIC_v6.0.2_mc1.20.6.jar?

@burningtnt

HMCL-dev@e0ecd5e, HMCL-dev/HMCL/actions/runs/9547498968

Preview Image

Could you provide a screenshot of the zip root directory after opening AmbientSounds_FABRIC_v6.0.2_mc1.20.6.jar this mod with a zip file viewer?

burningtnt commented 5 months ago

It's strange that HMCL consider this mod as a NeoForge mod.

3gf8jv4dv commented 5 months ago

@burningtnt

Preview ![](https://github.com/HMCL-dev/HMCL/assets/158490944/4c4693ce-bed8-467c-b2d6-416ef33bb4a4) ![](https://github.com/HMCL-dev/HMCL/assets/158490944/364daf72-4c72-4518-babf-a2cd08143633)

By the way, if the reply includes pictures, it is not recommended to quote them.

burningtnt commented 5 months ago

@burningtnt

Preview Image

I suppose this bug is because AmbientSounds_FABRIC_v6.0.2_mc1.20.6.jar supports both Fabric and NeoForge. And HMCL only consider whether is support NeoForge.

3gf8jv4dv commented 5 months ago

I suppose this bug is because AmbientSounds_FABRIC_v6.0.2_mc1.20.6.jar supports both Fabric and NeoForge. And HMCL only consider whether is support NeoForge.

There is a reason why the mod’s developer marked FABRIC in the filename, and @TheWhiteDog9487 also proved this in https://github.com/HMCL-dev/HMCL/issues/3048#issuecomment-2132535344. I just tested this as well, the game does not launch on a NeoForge instance using AmbientSounds_FABRIC_v6.0.2_mc1.20.6.jar. Strictly speaking, this is a problem for the developers of the mod. Maybe I'll consider giving him/her/them feedback.

But having said that, some mods do support multiple modloaders in a single jar, and for such mods this issue is not a big deal, like the Zume and Serilum series. But showing them as mods from another modloader in one modloader’s instance does not sound like a good idea.

burningtnt commented 5 months ago

Yes, I agree with you. We will provide support for mods with multiple modloaders. But that maybe another task.

3gf8jv4dv commented 5 months ago

@burningtnt

Regarding the issues with AmbientSounds, I have reported them to its developers.

https://github.com/CreativeMD/AmbientSounds/issues/236

3gf8jv4dv commented 5 months ago

CreativeMD’s comment:

Sorry, but AmbientSound has one codebase for both versions. CreativeCore deals with the loading on different sides. All I could is to delete the files inside the jar when compiling them. But i also do not understand why the launcher needs to the stuff in that way anyway. I mean the launcher should know if a given instance is forge or fabric, right?