mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-12 13:26:53 -04:00
Fixed #68
This commit is contained in:
parent
1cf7d791cc
commit
75c4a24cbd
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -72,6 +72,7 @@ public class OptiFineInstaller extends Task implements PreviousResultRegistrar<F
|
|||||||
mv.mainClass = "net.minecraft.launchwrapper.Launch";
|
mv.mainClass = "net.minecraft.launchwrapper.Launch";
|
||||||
mv.libraries.add(1, new MinecraftLibrary("net.minecraft:launchwrapper:1.7"));
|
mv.libraries.add(1, new MinecraftLibrary("net.minecraft:launchwrapper:1.7"));
|
||||||
}
|
}
|
||||||
|
if (!mv.minecraftArguments.contains("FMLTweaker"))
|
||||||
mv.minecraftArguments += " --tweakClass optifine.OptiFineTweaker";
|
mv.minecraftArguments += " --tweakClass optifine.OptiFineTweaker";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public class GameLauncher {
|
|||||||
*
|
*
|
||||||
* @throws IOException failed creating process
|
* @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()))
|
if (!service.version().onLaunch(options.getLaunchVersion()))
|
||||||
return;
|
return;
|
||||||
if (StrUtils.isNotBlank(options.getPrecalledCommand())) {
|
if (StrUtils.isNotBlank(options.getPrecalledCommand())) {
|
||||||
@ -133,6 +133,7 @@ public class GameLauncher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HMCLog.log("Starting process");
|
HMCLog.log("Starting process");
|
||||||
|
HMCLog.log(str.toString());
|
||||||
ProcessBuilder builder = new ProcessBuilder(str);
|
ProcessBuilder builder = new ProcessBuilder(str);
|
||||||
if (options.getLaunchVersion() == null || service.baseDirectory() == null)
|
if (options.getLaunchVersion() == null || service.baseDirectory() == null)
|
||||||
throw new Error("Fucking bug!");
|
throw new Error("Fucking bug!");
|
||||||
|
@ -121,7 +121,7 @@ public class MinecraftVersion implements Cloneable, Comparable<MinecraftVersion>
|
|||||||
this.assets != null ? this.assets : parent.assets,
|
this.assets != null ? this.assets : parent.assets,
|
||||||
this.jar != null ? this.jar : parent.jar,
|
this.jar != null ? this.jar : parent.jar,
|
||||||
null, this.runDir, parent.minimumLauncherVersion,
|
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.downloads != null ? this.downloads : parent.downloads,
|
||||||
this.assetIndex != null ? this.assetIndex : parent.assetIndex);
|
this.assetIndex != null ? this.assetIndex : parent.assetIndex);
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ public final class StrUtils {
|
|||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEquals(String base, String to) {
|
public static boolean equals(String base, String to) {
|
||||||
if (base == null)
|
if (base == null)
|
||||||
return (to == null);
|
return (to == null);
|
||||||
else
|
else
|
||||||
@ -240,4 +240,14 @@ public final class StrUtils {
|
|||||||
t.printStackTrace(writer);
|
t.printStackTrace(writer);
|
||||||
return trace.toString();
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user