Don't interpret the new nf version format as the old one (#363)

Fixes #335
This commit is contained in:
TheEpicBlock 2025-09-02 17:10:22 +02:00 committed by GitHub
parent c3a6e56882
commit adfe66935c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,7 +103,9 @@ var initCmd = &cobra.Command{
}
}
v := componentVersion
if loader.Name == "forge" || loader.Name == "neoforge" {
// Forge uses a format where they prefix their version with their supported minecraft version. NeoForge
// did this too, but only during the 1.20.1 days, they've since switched formats.
if loader.Name == "forge" || (loader.Name == "neoforge" && mcVersion == "1.20.1") {
v = cmdshared.GetRawForgeVersion(componentVersion)
}
if !slices.Contains(versions, v) {