Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Commit

Permalink
Fix launching on 1.8.9 and 1.9.4 (resolves #79).
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi authored and Dunklheit committed Jun 24, 2020
1 parent 82fd53e commit 6bd4673
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 181 deletions.
8 changes: 4 additions & 4 deletions app/assets/js/processbuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

/**
Expand All @@ -194,7 +194,7 @@ class ProcessBuilder {
*/
_requiresAbsolute(){
try {
if(this._isBelowOneDotSeven()) {
if(this._lteMinorVersion(9)) {
return false
}
const ver = this.forgeData.id.split('-')[2]
Expand Down Expand Up @@ -578,7 +578,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)
Expand Down
Loading

0 comments on commit 6bd4673

Please sign in to comment.