diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a1464e1eca..0e3aee86ba 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,4 +5,3 @@ Make sure to clear this after each release What's new: ----------------- - Updated mixins to be more lenient if they can't be applied -- Added compatibility for Embeddium if used on Forge via Sinytra Connector diff --git a/src/main/java/net/frozenblock/wilderwild/mixin/WilderWildMixinPlugin.java b/src/main/java/net/frozenblock/wilderwild/mixin/WilderWildMixinPlugin.java index 6f8dc1f376..c8d39bb403 100644 --- a/src/main/java/net/frozenblock/wilderwild/mixin/WilderWildMixinPlugin.java +++ b/src/main/java/net/frozenblock/wilderwild/mixin/WilderWildMixinPlugin.java @@ -21,8 +21,6 @@ import java.util.List; import java.util.Set; import net.fabricmc.loader.api.FabricLoader; -import net.fabricmc.loader.api.Version; -import net.fabricmc.loader.api.VersionParsingException; import net.frozenblock.lib.FrozenBools; import net.frozenblock.wilderwild.misc.WilderPreMixinInjectConstants; import org.jetbrains.annotations.NotNull; @@ -32,8 +30,6 @@ import org.spongepowered.asm.mixin.extensibility.IMixinInfo; public class WilderWildMixinPlugin implements IMixinConfigPlugin { - private static final String MIXIN_PATH = "net.frozenblock.wilderwild.mixin."; - private static final boolean FORGE = FabricLoader.getInstance().isModLoaded("connector"); @Override public void onLoad(String mixinPackage) { @@ -49,17 +45,10 @@ public String getRefMapperConfig() { @Override public boolean shouldApplyMixin(String targetClassName, @NotNull String mixinClassName) { if (mixinClassName.contains("sodium")) { - if (FORGE) - try { - return FabricLoader.getInstance().isModLoaded("embeddium") && FabricLoader.getInstance().getModContainer("embeddium").orElseThrow().getMetadata().getVersion().compareTo(Version.parse("0.2")) > 0; - } catch (VersionParsingException e) { - return false; - } return FrozenBools.HAS_SODIUM && FabricLoader.getInstance().getModContainer("sodium").orElseThrow().getMetadata().getVersion().getFriendlyString().contains("0.5."); } if (mixinClassName.contains("LiquidBlockRenderer") || mixinClassName.contains("CloudRenderer") || mixinClassName.contains("EntityRenderDispatcher")) { - if (FORGE) return !FabricLoader.getInstance().isModLoaded("embeddium"); - return !FrozenBools.HAS_SODIUM; + return !FabricLoader.getInstance().isModLoaded("embeddium") && !FrozenBools.HAS_SODIUM; } if (mixinClassName.contains("fallingleaves")) { return WilderPreMixinInjectConstants.HAS_FALLINGLEAVES;