@@ -32,22 +32,18 @@ public void doTask() throws Exception {
32
32
List <String > cpList = new LinkedList <>();
33
33
if (side == SERVER ) {
34
34
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 ));
40
36
}
37
+ cpList .add (FileUtil .absolutePathString (MCPConfig .SERVER_BIN ));
38
+ cpList .add (FileUtil .absolutePathString (MCPConfig .SERVER ));
41
39
}
42
40
else if (side == CLIENT ) {
43
41
if (MCP .config .runBuild ) {
44
- cpList .add (FileUtil .absolutePathString (MCPConfig .BUILD_JAR_CLIENT ));
42
+ cpList .add (FileUtil .absolutePathString (MCPConfig .BUILD_ZIP_CLIENT ));
45
43
}
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 ));
51
47
}
52
48
List <String > libraries = new ArrayList ();
53
49
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) {
69
65
"-Dorg.lwjgl.librarypath=" + natives ,
70
66
"-Dnet.java.games.input.librarypath=" + natives ,
71
67
"-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" ));
73
70
for (int i = 1 ; i < MCP .config .runArgs .length ; i ++) {
74
71
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 )) {
78
81
args .remove (arg2 );
79
82
break ;
80
83
}
81
84
}
82
- else if (arg2 .equals (arg )) {
83
- args .remove (arg2 );
84
- break ;
85
- }
85
+ args .add (1 , arg );
86
86
}
87
- args .add (1 , arg );
88
87
}
89
- //MCP.logger.println(args);
90
88
int exit = Util .runCommand (args .toArray (new String [0 ]), Paths .get (MCPConfig .JARS ), true );
91
89
if (exit != 0 ) {
92
90
throw new RuntimeException ("Finished with exit value " + exit );
0 commit comments