[1.20.1] FML appears to resolve 0.0NONE as a valid version within version constraints
Minecraft Version: 1.20.1
Forge Version: 47.4.5, 47.4.10 was also tested afterwards.
Logs: latest.log - https://mclo.gs/IOFGhWY debug.log - https://mclo.gs/8562OTS
Steps to Reproduce:
- Install Immersive Vehicles and Immersive Vehicles Official Content Pack
- Launch the game
- It incorrectly launches (expected: crash due to mismatched version constraint)
Description of issue:
When the MANIFEST.MF is missing the Implementation-Version, FML replaces ${file.jarVersion} in the mods.toml with 0.0NONE as expected.
However, when a mod (in this case, mtsofficialpack) requests for a version range of [22.18.0,) and matches it against the replaced 0.0NONE, it erroneously matches correctly.
An additional test was performed with two separate mods built using the MDK:
- The first mod with the ID
weirdforgeversionresolve1, version1.0.0, which holds a mandatory dependency onweirdforgeversionresolve2with the version range[22.4.7,). - The second mod with the ID
weirdforgeversionresolve2, which was built with theImplementation-Versionset to1.0.0and the mods.toml version manually set to0.0NONE.
In this test, the game still launched properly despite what should be considered a mismatched version.
Haven't tested yet if this occurs on versions later or earlier than 1.20.1.
Source: MinecraftForge/MinecraftForge