This commit is contained in:
huangyuhui 2016-05-10 13:24:06 +08:00
parent 1cf7d791cc
commit 75c4a24cbd
6 changed files with 16 additions and 11056 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -72,7 +72,8 @@ public class OptiFineInstaller extends Task implements PreviousResultRegistrar<F
mv.mainClass = "net.minecraft.launchwrapper.Launch";
mv.libraries.add(1, new MinecraftLibrary("net.minecraft:launchwrapper:1.7"));
}
mv.minecraftArguments += " --tweakClass optifine.OptiFineTweaker";
if (!mv.minecraftArguments.contains("FMLTweaker"))
mv.minecraftArguments += " --tweakClass optifine.OptiFineTweaker";
}
}
File loc = new File(service.baseDirectory(), "versions/" + mv.id);

View File

@ -120,7 +120,7 @@ public class GameLauncher {
*
* @throws IOException failed creating process
*/
public void launch(List str) throws IOException {
public void launch(List<String> str) throws IOException {
if (!service.version().onLaunch(options.getLaunchVersion()))
return;
if (StrUtils.isNotBlank(options.getPrecalledCommand())) {
@ -133,6 +133,7 @@ public class GameLauncher {
}
}
HMCLog.log("Starting process");
HMCLog.log(str.toString());
ProcessBuilder builder = new ProcessBuilder(str);
if (options.getLaunchVersion() == null || service.baseDirectory() == null)
throw new Error("Fucking bug!");

View File

@ -121,7 +121,7 @@ public class MinecraftVersion implements Cloneable, Comparable<MinecraftVersion>
this.assets != null ? this.assets : parent.assets,
this.jar != null ? this.jar : parent.jar,
null, this.runDir, parent.minimumLauncherVersion,
this.libraries != null ? ArrayUtils.merge(this.libraries, parent.libraries) : parent.libraries, this.hidden,
this.libraries != null ? ArrayUtils.merge(parent.libraries, this.libraries) : parent.libraries, this.hidden,
this.downloads != null ? this.downloads : parent.downloads,
this.assetIndex != null ? this.assetIndex : parent.assetIndex);

View File

@ -184,7 +184,7 @@ public final class StrUtils {
return sb.toString();
}
public static boolean isEquals(String base, String to) {
public static boolean equals(String base, String to) {
if (base == null)
return (to == null);
else
@ -240,4 +240,14 @@ public final class StrUtils {
t.printStackTrace(writer);
return trace.toString();
}
public static List<Integer> findAllPos(String t, String p) {
ArrayList<Integer> ret = new ArrayList<>();
int i = 0, index;
while ((index = t.indexOf(p, i)) != -1) {
ret.add(index);
i = index + p.length();
}
return ret;
}
}