@@ -32,22 +32,18 @@ public void doTask() throws Exception {
3232 List <String > cpList = new LinkedList <>();
3333 if (side == SERVER ) {
3434 if (MCP .config .runBuild ) {
35- cpList .add (FileUtil .absolutePathString (MCPConfig .BUILD_JAR_SERVER ));
36- }
37- else {
38- cpList .add (FileUtil .absolutePathString (MCPConfig .SERVER_BIN ));
39- cpList .add (FileUtil .absolutePathString (MCPConfig .SERVER ));
35+ cpList .add (FileUtil .absolutePathString (MCPConfig .BUILD_ZIP_SERVER ));
4036 }
37+ cpList .add (FileUtil .absolutePathString (MCPConfig .SERVER_BIN ));
38+ cpList .add (FileUtil .absolutePathString (MCPConfig .SERVER ));
4139 }
4240 else if (side == CLIENT ) {
4341 if (MCP .config .runBuild ) {
44- cpList .add (FileUtil .absolutePathString (MCPConfig .BUILD_JAR_CLIENT ));
42+ cpList .add (FileUtil .absolutePathString (MCPConfig .BUILD_ZIP_CLIENT ));
4543 }
46- else {
47- cpList .add (FileUtil .absolutePathString (MCPConfig .CLIENT_BIN ));
48- if (!Files .exists (Paths .get (MCPConfig .CLIENT_FIXED ))) {
49- cpList .add (FileUtil .absolutePathString (MCPConfig .CLIENT ));
50- }
44+ cpList .add (FileUtil .absolutePathString (MCPConfig .CLIENT_BIN ));
45+ if (!Files .exists (Paths .get (MCPConfig .CLIENT_FIXED ))) {
46+ cpList .add (FileUtil .absolutePathString (MCPConfig .CLIENT ));
5147 }
5248 List <String > libraries = new ArrayList ();
5349 try (Stream <Path > stream = Files .list (Paths .get (MCPConfig .LIB )).filter (library -> !library .endsWith (".jar" )).filter (library -> !Files .isDirectory (library ))) {
@@ -69,24 +65,26 @@ else if (side == CLIENT) {
6965 "-Dorg.lwjgl.librarypath=" + natives ,
7066 "-Dnet.java.games.input.librarypath=" + natives ,
7167 "-cp" , cp ,
72- side == SERVER ? (VersionsParser .getServerVersion ().startsWith ("c" ) ? "com.mojang.minecraft.server.MinecraftServer" : "net.minecraft.server.MinecraftServer" ) : "Start" ));
68+ side == SERVER ? (VersionsParser .getServerVersion ().startsWith ("c" ) ? "com.mojang.minecraft.server.MinecraftServer" : "net.minecraft.server.MinecraftServer" )
69+ : MCP .config .runBuild ? "net.minecraft.client.Minecraft" : "Start" ));
7370 for (int i = 1 ; i < MCP .config .runArgs .length ; i ++) {
7471 String arg = MCP .config .runArgs [i ];
75- for (String arg2 : args ) {
76- if (arg .indexOf ("=" ) > 0 && arg2 .indexOf ("=" ) > 0 ) {
77- if (arg2 .substring (0 , arg2 .indexOf ("=" )).equals (arg .substring (0 , arg .indexOf ("=" )))) {
72+ if (!arg .equals ("-runbuild" )) {
73+ for (String arg2 : args ) {
74+ if (arg .indexOf ("=" ) > 0 && arg2 .indexOf ("=" ) > 0 ) {
75+ if (arg2 .substring (0 , arg2 .indexOf ("=" )).equals (arg .substring (0 , arg .indexOf ("=" )))) {
76+ args .remove (arg2 );
77+ break ;
78+ }
79+ }
80+ else if (arg2 .equals (arg )) {
7881 args .remove (arg2 );
7982 break ;
8083 }
8184 }
82- else if (arg2 .equals (arg )) {
83- args .remove (arg2 );
84- break ;
85- }
85+ args .add (1 , arg );
8686 }
87- args .add (1 , arg );
8887 }
89- //MCP.logger.println(args);
9088 int exit = Util .runCommand (args .toArray (new String [0 ]), Paths .get (MCPConfig .JARS ), true );
9189 if (exit != 0 ) {
9290 throw new RuntimeException ("Finished with exit value " + exit );
0 commit comments