Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2862e3a6ee | ||
|
|
75c4a24cbd | ||
|
|
1cf7d791cc | ||
|
|
62fecc08ac |
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Binary file not shown.
+2
-1
@@ -72,7 +72,8 @@ 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"));
|
||||||
}
|
}
|
||||||
mv.minecraftArguments += " --tweakClass optifine.OptiFineTweaker";
|
if (!mv.minecraftArguments.contains("FMLTweaker"))
|
||||||
|
mv.minecraftArguments += " --tweakClass optifine.OptiFineTweaker";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File loc = new File(service.baseDirectory(), "versions/" + mv.id);
|
File loc = new File(service.baseDirectory(), "versions/" + mv.id);
|
||||||
|
|||||||
+2
-1
@@ -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!");
|
||||||
|
|||||||
+1
-1
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,6 @@ public final class MainFrame extends DraggableFrame {
|
|||||||
|
|
||||||
windowTitle = new JLabel(defaultTitle);
|
windowTitle = new JLabel(defaultTitle);
|
||||||
windowTitle.setForeground(BasicColors.COLOR_WHITE_TEXT);
|
windowTitle.setForeground(BasicColors.COLOR_WHITE_TEXT);
|
||||||
windowTitle.addMouseListener(MouseListenerImpl.INSTANCE);
|
|
||||||
header.add(windowTitle);
|
header.add(windowTitle);
|
||||||
header.add(Box.createHorizontalGlue());
|
header.add(Box.createHorizontalGlue());
|
||||||
header.add(rightHeaderPanel);
|
header.add(rightHeaderPanel);
|
||||||
@@ -420,6 +419,7 @@ public final class MainFrame extends DraggableFrame {
|
|||||||
|
|
||||||
public void invokeUpdate() {
|
public void invokeUpdate() {
|
||||||
defaultTitle = Main.makeTitle() + C.i18n("update.found");
|
defaultTitle = Main.makeTitle() + C.i18n("update.found");
|
||||||
|
windowTitle.addMouseListener(MouseListenerImpl.INSTANCE);
|
||||||
if (!isShowedMessage) {
|
if (!isShowedMessage) {
|
||||||
windowTitle.setText(defaultTitle);
|
windowTitle.setText(defaultTitle);
|
||||||
windowTitle.setForeground(Color.red);
|
windowTitle.setForeground(Color.red);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 27 KiB |
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,7 @@ import java.io.FileInputStream;
|
|||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
import org.jackhuang.hellominecraft.util.func.BiFunction;
|
import org.jackhuang.hellominecraft.util.func.BiFunction;
|
||||||
@@ -100,7 +101,7 @@ public class ZipEngine {
|
|||||||
pathName = pathNameCallback.apply(pathName, true);
|
pathName = pathNameCallback.apply(pathName, true);
|
||||||
if (pathName == null)
|
if (pathName == null)
|
||||||
continue;
|
continue;
|
||||||
zos.putNextEntry(new ZipEntry(pathName));
|
put(new ZipEntry(pathName));
|
||||||
putDirectoryImpl(file, basePath, pathNameCallback);
|
putDirectoryImpl(file, basePath, pathNameCallback);
|
||||||
} else {
|
} else {
|
||||||
if (".DS_Store".equals(file.getName())) // For Mac computers.
|
if (".DS_Store".equals(file.getName())) // For Mac computers.
|
||||||
@@ -122,7 +123,7 @@ public class ZipEngine {
|
|||||||
public void putStream(InputStream is, String pathName) throws IOException {
|
public void putStream(InputStream is, String pathName) throws IOException {
|
||||||
int length;
|
int length;
|
||||||
try (BufferedInputStream bis = new BufferedInputStream(is)) {
|
try (BufferedInputStream bis = new BufferedInputStream(is)) {
|
||||||
zos.putNextEntry(new ZipEntry(pathName));
|
put(new ZipEntry(pathName));
|
||||||
while ((length = bis.read(buf)) > 0)
|
while ((length = bis.read(buf)) > 0)
|
||||||
zos.write(buf, 0, length);
|
zos.write(buf, 0, length);
|
||||||
}
|
}
|
||||||
@@ -136,4 +137,11 @@ public class ZipEngine {
|
|||||||
putStream(new ByteArrayInputStream(text.getBytes(encoding)), pathName);
|
putStream(new ByteArrayInputStream(text.getBytes(encoding)), pathName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected HashSet<String> names = new HashSet<>();
|
||||||
|
|
||||||
|
public void put(ZipEntry entry) throws IOException {
|
||||||
|
if (names.add(entry.getName()))
|
||||||
|
zos.putNextEntry(entry);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user