From ad64cc56abe7bcb9e575a39f43de855f3a9d92d2 Mon Sep 17 00:00:00 2001 From: TonimatasDEV Date: Mon, 10 Jun 2024 21:02:20 +0200 Subject: [PATCH] Fix Immersive Portals compat --- .../dev/tonimatas/packetfixer/mixins/MixinConfigPlugin.java | 6 +++++- gradle.properties | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/dev/tonimatas/packetfixer/mixins/MixinConfigPlugin.java b/common/src/main/java/dev/tonimatas/packetfixer/mixins/MixinConfigPlugin.java index 7229683..1723354 100644 --- a/common/src/main/java/dev/tonimatas/packetfixer/mixins/MixinConfigPlugin.java +++ b/common/src/main/java/dev/tonimatas/packetfixer/mixins/MixinConfigPlugin.java @@ -28,6 +28,7 @@ public String getRefMapperConfig() { public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { boolean connectivity = Hooks.isModLoaded("connectivity"); boolean krypton = Hooks.isModLoaded("krypton") || Hooks.isModLoaded("pluto"); + boolean immersivePortals = Hooks.isModLoaded("immersive_portals"); if (MixinCheck.with(mixinClassName, "CompressionDecoderMixin")) { if (connectivity) { @@ -35,8 +36,11 @@ public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { return false; } } + if (MixinCheck.with(mixinClassName, "Varint21FrameDecoderMixin") || MixinCheck.with(mixinClassName, "Varint21LengthFieldPrependerMixin")) return !krypton; - + + if (MixinCheck.with(mixinClassName, "ClientboundCustomPayloadPacketMixin")) return !immersivePortals; + return true; } diff --git a/gradle.properties b/gradle.properties index 58a5e9c..53daafe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false # Mod Properties -modVersion=1.4.1 +modVersion=1.4.2 # Minecraft minecraftVersion=1.20.1