浏览代码

Add version.jar to cp until 1.17.

Daniel Scalzi 4 年之前
父节点
当前提交
f6f8a7ed3c
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      app/assets/js/processbuilder.js

+ 7 - 4
app/assets/js/processbuilder.js

@@ -670,10 +670,13 @@ class ProcessBuilder {
     classpathArg(mods, tempNativePath){
         let cpArgs = []
 
-        // Add the version.jar to the classpath.
-        // TODO Needs to be removed for 1.17+, need to test earlier versions.
-        // const version = this.versionData.id
-        // cpArgs.push(path.join(this.commonDir, 'versions', version, version + '.jar'))
+        if(!Util.mcVersionAtLeast('1.17', this.server.getMinecraftVersion())) {
+            // Add the version.jar to the classpath.
+            // Must not be added to the classpath for Forge 1.17+.
+            const version = this.versionData.id
+            cpArgs.push(path.join(this.commonDir, 'versions', version, version + '.jar'))
+        }
+        
 
         if(this.usingLiteLoader){
             cpArgs.push(this.llPath)