Skip to content

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 committed Jun 23, 2020
1 parent ef8f36b commit f795b28
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 219 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 @@ -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)
Expand Down
Loading

0 comments on commit f795b28

Please sign in to comment.