Default to 0.0.0 if 1.7-1.12 mod contains version wildcard.

This data likely lives only in the class file, which we cannot access.
This commit is contained in:
Daniel Scalzi
2020-02-19 01:16:44 -05:00
parent 126d6e67dc
commit f99e53bed2
2 changed files with 7 additions and 1 deletions

View File

@@ -84,6 +84,11 @@ export class ForgeModStructure17 extends BaseForgeModStructure {
} else {
this.forgeModMetadata[name] = (resolved as McModInfo[])[0]
}
// No way to resolve this AFAIK
if(this.forgeModMetadata[name]!.version.indexOf('@') > -1 || this.forgeModMetadata[name]!.version.indexOf('$') > -1) {
// Ex. @VERSION@, ${version}
this.forgeModMetadata[name]!.version = '0.0.0'
}
} catch (err) {
console.error(`ForgeMod ${name} contains an invalid mcmod.info file.`)
createDefault = true