From 3595aa0f85725feeffc53f6a781d01b164ddf5fc Mon Sep 17 00:00:00 2001 From: dima_dencep Date: Mon, 10 Jun 2024 05:40:34 +0700 Subject: [PATCH] Fix bendylib --- .../sodium/mixin/IrisSodiumCompatMixinPlugin.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sodiumCompatibility/java/net/irisshaders/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java b/src/sodiumCompatibility/java/net/irisshaders/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java index 5bfbe6c96d..f13c8bb458 100644 --- a/src/sodiumCompatibility/java/net/irisshaders/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java +++ b/src/sodiumCompatibility/java/net/irisshaders/iris/compat/sodium/mixin/IrisSodiumCompatMixinPlugin.java @@ -15,10 +15,12 @@ */ public class IrisSodiumCompatMixinPlugin implements IMixinConfigPlugin { + public static boolean isBendyLibLoaded; public static boolean isRubidiumLoaded; @Override public void onLoad(String mixinPackage) { + isBendyLibLoaded = LoadingModList.get().getModFileById("bendylib") != null; isRubidiumLoaded = LoadingModList.get().getModFileById("rubidium") != null; } @@ -29,7 +31,15 @@ public String getRefMapperConfig() { @Override public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { - return isRubidiumLoaded; + if (!isRubidiumLoaded) { + return false; + } + + if (mixinClassName.endsWith(".copyEntity.ModelPartMixin") || mixinClassName.endsWith(".copyEntity.CuboidMixin")) { + return !isBendyLibLoaded; + } + + return true; } @Override