Skip to content

Commit

Permalink
Fixed #68
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghongxun committed May 10, 2016
1 parent 1cf7d79 commit 75c4a24
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11,056 deletions.
5,461 changes: 0 additions & 5,461 deletions HMCL/obfuscate_2.3.3.map

This file was deleted.

5,591 changes: 0 additions & 5,591 deletions HMCL/obfuscate_2.3.4.map

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public void executeTask() throws Exception {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public IMinecraftLoader makeLaunchCommand() throws AuthenticationException, Game
*
* @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())) {
Expand All @@ -133,6 +133,7 @@ public void launch(List str) throws IOException {
}
}
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!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected MinecraftVersion resolve(IMinecraftProvider provider, Set<String> reso
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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ else if (param.getClass().isArray()) {
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
Expand Down Expand Up @@ -240,4 +240,14 @@ public static String getStackTrace(Throwable t) {
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;
}
}

0 comments on commit 75c4a24

Please sign in to comment.