Add LWJGL3; Add GLFW source to merge CallbackBridge.java
This commit is contained in:
1 parent
a690be4d1b
commit
2701d13425
173 files changed
+49393
-156
No files matched your search
@@ -1,62 +0,0 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.geometry.Rectangle2D;
|
||||
import javafx.scene.Group;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.shape.Circle;
|
||||
import javafx.stage.Screen;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import net.kdt.pojavlaunch.utils.*;
|
||||
import net.kdt.pojavlaunch.value.*;
|
||||
|
||||
import org.lwjgl.glfw.CallbackBridge;
|
||||
|
||||
public class PLaunchJFXApp extends Application {
|
||||
public void start(Stage stage) {
|
||||
Rectangle2D bounds = Screen.getPrimary().getBounds();
|
||||
CallbackBridge.windowWidth = (int) bounds.getWidth();
|
||||
CallbackBridge.windowHeight = (int) bounds.getHeight();
|
||||
|
||||
JREUtils.saveGLContext();
|
||||
|
||||
// Start Minecraft there!
|
||||
File file = new File(Tools.DIR_GAME_NEW);
|
||||
file.mkdirs();
|
||||
|
||||
String mcver = "1.13";
|
||||
try {
|
||||
mcver = Tools.read(Tools.DIR_GAME_HOME + "/config_ver.txt");
|
||||
} catch (IOException e) {
|
||||
System.out.println("config_ver.txt not found, defaulting to Minecraft 1.13");
|
||||
}
|
||||
|
||||
MinecraftAccount acc = new MinecraftAccount();
|
||||
acc.selectedVersion = mcver;
|
||||
JMinecraftVersionList.Version version = Tools.getVersionInfo(mcver);
|
||||
|
||||
try {
|
||||
Tools.launchMinecraft(acc, version);
|
||||
} catch (Throwable th) {
|
||||
Tools.showError(th);
|
||||
}
|
||||
|
||||
/*
|
||||
net.minecraft.client.main.Main.main(new String[]{
|
||||
"--username", "test",
|
||||
"--version", "1.7.10",
|
||||
"--gameDir", file.getAbsolutePath(),
|
||||
"--assetsDir", file.getAbsolutePath() + "/assets",
|
||||
"--assetIndex", "1.7.10",
|
||||
"--uuid", "0",
|
||||
"--accessToken", "0",
|
||||
"--userProperties", "{}",
|
||||
"--userType", "mojang",
|
||||
"--versionType", "release"
|
||||
});
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public final class Tools
|
||||
|
||||
// ctx.appendlnToLog("Minecraft Args: " + Arrays.toString(launchArgs));
|
||||
|
||||
final String launchClassPath = getLWJGL3ClassPath() + ":" + generateLaunchClassPath(profile.selectedVersion);
|
||||
final String launchClassPath = generateLaunchClassPath(profile.selectedVersion);
|
||||
|
||||
List<String> javaArgList = new ArrayList<String>();
|
||||
|
||||
@@ -242,11 +242,11 @@ public final class Tools
|
||||
public static String getPatchedFile(String version) {
|
||||
return DIR_HOME_VERSION + "/" + version + "/" + version + ".jar";
|
||||
}
|
||||
|
||||
/*
|
||||
private static String getLWJGL3ClassPath() {
|
||||
StringBuilder libStr = new StringBuilder();
|
||||
File lwjgl3Folder = new File(Tools.DIR_GAME_NEW, "lwjgl3");
|
||||
if (/* info.arguments != null && */ lwjgl3Folder.exists()) {
|
||||
if (/* info.arguments != null && @lwjgl3Folder.exists()) {
|
||||
for (File file: lwjgl3Folder.listFiles()) {
|
||||
if (file.getName().endsWith(".jar")) {
|
||||
libStr.append(file.getAbsolutePath() + ":");
|
||||
@@ -257,7 +257,7 @@ public final class Tools
|
||||
}
|
||||
return libStr.toString();
|
||||
}
|
||||
|
||||
*/
|
||||
private static boolean isClientFirst = false;
|
||||
public static String generateLaunchClassPath(String version) {
|
||||
StringBuilder libStr = new StringBuilder(); //versnDir + "/" + version + "/" + version + ".jar:";
|
||||
|
||||
Reference in new issue
Block a user