diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_20_5.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_20_5.java index 81859e91..0789372d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_20_5.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_20_5.java @@ -45,7 +45,6 @@ import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.util.*; @@ -118,15 +117,6 @@ private void loadItemMappings(Protocol1_20_3To1_20_5 protocol, CallbackInfo ci) }); } - @Redirect(method = "appendItemDataFixComponents", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;olderThanOrEqualTo(Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;)Z")) - private boolean changeSwordFixVersionRange(ProtocolVersion instance, ProtocolVersion other) { - if (other == ProtocolVersion.v1_8) { - return instance.betweenInclusive(LegacyProtocolVersion.b1_8tob1_8_1, ProtocolVersion.v1_8); - } else { - return instance.olderThanOrEqualTo(other); - } - } - // Older servers don't have these components, so we can use them to emulate old item behaviour without the need // of modifying tons of code in the game. @Inject(method = "appendItemDataFixComponents", at = @At("RETURN")) diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_21_2.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_21_4.java similarity index 89% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_21_2.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_21_4.java index edf01ff1..e528a650 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_21_2.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/viaversion/MixinBlockItemPacketRewriter1_21_4.java @@ -20,14 +20,14 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.viaversion; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; -import com.viaversion.viaversion.protocols.v1_21to1_21_2.rewriter.BlockItemPacketRewriter1_21_2; +import com.viaversion.viaversion.protocols.v1_21_2to1_21_4.rewriter.BlockItemPacketRewriter1_21_4; import net.raphimc.vialegacy.api.LegacyProtocolVersion; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; -@Mixin(value = BlockItemPacketRewriter1_21_2.class, remap = false) -public abstract class MixinBlockItemPacketRewriter1_21_2 { +@Mixin(value = BlockItemPacketRewriter1_21_4.class, remap = false) +public abstract class MixinBlockItemPacketRewriter1_21_4 { @Redirect(method = "appendItemDataFixComponents", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;olderThanOrEqualTo(Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;)Z")) private boolean changeSwordFixVersionRange(ProtocolVersion instance, ProtocolVersion other) { diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json index 064beef7..6e0a37ca 100644 --- a/src/main/resources/viafabricplus.mixins.json +++ b/src/main/resources/viafabricplus.mixins.json @@ -117,6 +117,7 @@ "fixes.minecraft.entity.MixinItemEntity", "fixes.minecraft.entity.MixinLivingEntity", "fixes.minecraft.entity.MixinMobEntity", + "fixes.minecraft.entity.MixinMooshroomEntity", "fixes.minecraft.entity.MixinOtherClientPlayerEntity", "fixes.minecraft.entity.MixinPlayerEntity", "fixes.minecraft.entity.MixinPlayerEntityRenderer", @@ -191,7 +192,7 @@ "fixes.vialegacy.MixinProtocolc0_30cpeToc0_28_30", "fixes.vialegacy.MixinProtocolr1_7_6_10Tor1_8", "fixes.viaversion.MixinBlockItemPacketRewriter1_20_5", - "fixes.viaversion.MixinBlockItemPacketRewriter1_21_2", + "fixes.viaversion.MixinBlockItemPacketRewriter1_21_4", "fixes.viaversion.MixinCommandBlockProvider", "fixes.viaversion.MixinCommonBoss", "fixes.viaversion.MixinEntityPacketRewriter1_12", @@ -220,8 +221,7 @@ "fixes.viaversion.MixinWorldPacketRewriter1_19", "viabedrock.MixinJoinPackets", "vialegacy.MixinExtensionProtocolMetadataStorage", - "vialegacy.MixinViaLegacyConfig", - "fixes.minecraft.entity.MixinMooshroomEntity" + "vialegacy.MixinViaLegacyConfig" ], "injectors": { "defaultRequire": 1 @@ -229,4 +229,4 @@ "overwrites": { "requireAnnotations": true } -} \ No newline at end of file +}