From 6cc2b74eefeeb099cbe9c58cac4480377dfaefd8 Mon Sep 17 00:00:00 2001 From: IThundxr Date: Sun, 6 Oct 2024 13:28:43 -0400 Subject: [PATCH] Fix iris compat --- .../dev/engine_room/flywheel/lib/util/ShadersModHandler.java | 2 +- .../java/dev/engine_room/flywheel/impl/compat/CompatMods.java | 3 ++- .../java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/src/lib/java/dev/engine_room/flywheel/lib/util/ShadersModHandler.java b/common/src/lib/java/dev/engine_room/flywheel/lib/util/ShadersModHandler.java index ccf26ce07..751767094 100644 --- a/common/src/lib/java/dev/engine_room/flywheel/lib/util/ShadersModHandler.java +++ b/common/src/lib/java/dev/engine_room/flywheel/lib/util/ShadersModHandler.java @@ -23,7 +23,7 @@ public final class ShadersModHandler { Package optifinePackage = Package.getPackage(OPTIFINE_ROOT_PACKAGE); IS_OPTIFINE_INSTALLED = optifinePackage != null; - // OptiFine and Iris/Oculus are assumed to be mutually exclusive + // OptiFine and Iris are assumed to be mutually exclusive if (IS_IRIS_LOADED) { FlwLibLink.INSTANCE.getLogger().debug("Iris detected."); diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java b/common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java index 4201aa98d..2ef7f7d03 100644 --- a/common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/compat/CompatMods.java @@ -1,5 +1,6 @@ package dev.engine_room.flywheel.impl.compat; +import java.util.Locale; import java.util.function.Supplier; import dev.engine_room.flywheel.impl.FlwImplXplat; @@ -12,7 +13,7 @@ public enum CompatMods { private final Supplier isLoaded; CompatMods() { - isLoaded = FlwImplXplat.INSTANCE.getModLoaded(name()); + isLoaded = FlwImplXplat.INSTANCE.getModLoaded(name().toLowerCase(Locale.ROOT)); } public boolean isLoaded() { diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java index 75194fed8..b081fd9d6 100644 --- a/fabric/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java +++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java @@ -52,7 +52,7 @@ public class FlwLibXplatImpl implements FlwLibXplat { @Override @Nullable public ShadersModHandler.InternalHandler createIrisHandler() { - if (CompatMods.IRIS.isLoaded()) { + if (!CompatMods.IRIS.isLoaded()) { return null; }