@@ -55,6 +55,10 @@ public final class DependencyHelper {
5555 "com.fox2code.FoxLoader:loader:" + BuildConfig .FOXLOADER_VERSION ,
5656 FOX2CODE , "com.fox2code.foxloader.loader.ModLoader" );
5757
58+ public static final Dependency lwjglx = new Dependency (
59+ "com.fox2code:lwjglx:" + BuildConfig .LWJGLX_VERSION ,
60+ FOX2CODE , "org.lwjgl.system.LWJGLXHelper" , null , "d29d5a65988b001dd83d474cd1a1ecb659f353b2ebab5877454cd7d19c1a08bf" );
61+
5862 public static final Dependency jansi = new Dependency (
5963 "org.fusesource.jansi:jansi:" + BuildConfig .JANSI_VERSION , MAVEN_CENTRAL ,
6064 "org.fusesource.jansi.AnsiConsole" , null , "0b7b8b003a90ea491579b62f5118828e45112914c65589b00faa49d6ec785839" );
@@ -196,8 +200,15 @@ public static void loadCoreDependencies(boolean client) {
196200 for (Dependency dependency : commonDependencies ) {
197201 loadDependencyBuiltIn (dependency );
198202 }
199- for (Dependency dependency : lwjgl2Dependencies ) {
200- loadDependencySafe (dependency );
203+ if ((DependencyImpl .CURRENT_IMPL .hasClass ("org.lwjgl.opengl.GL11" ) &&
204+ !DependencyImpl .CURRENT_IMPL .hasClass ("org.lwjgl.opengl.Display" )) ||
205+ DependencyImpl .CURRENT_IMPL .hasClass ("org.lwjgl.system.LWJGLXHelper" )) {
206+ // If we are on LWJGL3 so let's use LWJGL3
207+ loadDependency (lwjglx );
208+ } else {
209+ for (Dependency dependency : lwjgl2Dependencies ) {
210+ loadDependencySafe (dependency );
211+ }
201212 }
202213 if (!(DependencyImpl .CURRENT_IMPL .isDevelopingFoxLoader () ||
203214 DependencyImpl .CURRENT_IMPL .isDevelopingMod ())) {
@@ -206,6 +217,7 @@ public static void loadCoreDependencies(boolean client) {
206217 checkDependency (annotations );
207218 if (DependencyImpl .CURRENT_IMPL .isDevelopingFoxLoader ()) {
208219 loadDependencyAsFile (vineFlower );
220+ loadDependencyAsFile (lwjglx );
209221 }
210222 }
211223
0 commit comments