Skip to content

Commit

Permalink
Fix bendylib
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-dencep committed Jun 9, 2024
1 parent 4509954 commit 3595aa0
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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
Expand Down

0 comments on commit 3595aa0

Please sign in to comment.