Try Minecraft on main thread

This commit is contained in:
Duy Tran Khanh committed 2021-01-01 19:21:24 +07:00
1 parent c7d184fe81
commit 3af16dd226
2 files changed
+5 -2

No files matched your search

@@ -51,6 +51,8 @@ public class PLaunchApp {
if (args[0].startsWith("/Applications/")) {
System.out.println("We are on java now! Starting UI...");
org.lwjgl.glfw.CallbackBridge.nativeLaunchUI(args);
} else {
launchMinecraft();
}
LauncherPreferences.loadPreferences();
@@ -83,18 +83,19 @@ public final class Tools
}
}
new Thread(() -> { try {
// new Thread(() -> { try {
URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[0]), Tools.class.getClassLoader());
Class<?> clazz = loader.loadClass(versionInfo.mainClass);
Method method = clazz.getMethod("main", String[].class);
method.invoke(null, new Object[]{launchArgs});
/*
} catch (Throwable th) {
throw new RuntimeException(th);
}
}).start();
*/
// JREUtils.launchJavaVM(javaArgList);
}