Don't try to update LWJGL 2 to 3 on arm machines.

dev/0.11
modmuss50 2022-01-26 13:52:36 +00:00
parent d4be1e7bdc
commit 98b87969cb
2 changed files with 9 additions and 3 deletions

View File

@ -61,8 +61,14 @@ public class LWJGLVersionOverride {
/**
* Update lwjgl by default when running on arm and a supported configuration.
*/
public static boolean overrideByDefault() {
return NATIVE_CLASSIFIER != null && Architecture.CURRENT.isArm();
public static boolean overrideByDefault(MinecraftVersionMeta versionMeta) {
if (NATIVE_CLASSIFIER == null || !Architecture.CURRENT.isArm()) {
return false;
}
return versionMeta.libraries().stream()
.map(MinecraftVersionMeta.Library::name)
.anyMatch(s -> s.startsWith("org.lwjgl:lwjgl:3"));
}
public static boolean forceOverride(Project project) {

View File

@ -46,7 +46,7 @@ public class MinecraftLibraryProvider {
final BundleMetadata serverBundleMetadata = minecraftProvider.getServerBundleMetadata();
final boolean runtimeOnlyLog4j = extension.getRuntimeOnlyLog4j().get();
final boolean overrideLWJGL = LWJGLVersionOverride.overrideByDefault() || LWJGLVersionOverride.forceOverride(project) || Boolean.getBoolean("loom.test.lwjgloverride");
final boolean overrideLWJGL = LWJGLVersionOverride.overrideByDefault(versionInfo) || LWJGLVersionOverride.forceOverride(project) || Boolean.getBoolean("loom.test.lwjgloverride");
final boolean isMacOS = OperatingSystem.CURRENT_OS.equals(OperatingSystem.MAC_OS);
if (overrideLWJGL) {