Fix launching on 1.8.9 and 1.9.4 (resolves #79).

This commit is contained in:
Daniel Scalzi
2020-06-23 15:03:17 -04:00
parent ef8f36b519
commit f795b28d23
3 changed files with 54 additions and 219 deletions

View File

@@ -184,8 +184,8 @@ class ProcessBuilder {
}
}
_isBelowOneDotSeven() {
return Number(this.forgeData.id.split('-')[0].split('.')[1]) <= 7
_lteMinorVersion(version) {
return Number(this.forgeData.id.split('-')[0].split('.')[1]) <= Number(version)
}
/**
@@ -194,7 +194,7 @@ class ProcessBuilder {
*/
_requiresAbsolute(){
try {
if(this._isBelowOneDotSeven()) {
if(this._lteMinorVersion(9)) {
return false
}
const ver = this.forgeData.id.split('-')[2]
@@ -569,7 +569,7 @@ class ProcessBuilder {
// Mod List File Argument
mcArgs.push('--modListFile')
if(this._isBelowOneDotSeven()) {
if(this._lteMinorVersion(9)) {
mcArgs.push(path.basename(this.fmlDir))
} else {
mcArgs.push('absolute:' + this.fmlDir)