From 95500c38a8c456c6bdf1b9232867540dc36be7ef Mon Sep 17 00:00:00 2001 From: aria1th <35677394+aria1th@users.noreply.github.com> Date: Thu, 19 Oct 2023 20:43:37 +0900 Subject: [PATCH] fix 1.20.2 really mojang? --- .../ClientPlayNetworkHandlerMixin.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/io/github/eatmyvenom/litematicin/mixin/MinecraftClient/ClientPlayNetworkHandlerMixin.java b/src/main/java/io/github/eatmyvenom/litematicin/mixin/MinecraftClient/ClientPlayNetworkHandlerMixin.java index 44a0cde..e5b735b 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/mixin/MinecraftClient/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/mixin/MinecraftClient/ClientPlayNetworkHandlerMixin.java @@ -10,6 +10,11 @@ import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.ClientPlayerEntity; +//#if MC>=12002 +//$$ import net.minecraft.client.network.ClientCommonNetworkHandler; +//$$ import net.minecraft.client.network.ClientConnectionState; +//$$ import net.minecraft.network.ClientConnection; +//#endif import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket; import net.minecraft.network.packet.s2c.play.ScreenHandlerSlotUpdateS2CPacket; import net.minecraft.network.packet.s2c.play.UpdateSelectedSlotS2CPacket; @@ -20,12 +25,20 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +//#if MC<=12001 @Mixin(ClientPlayNetworkHandler.class) public class ClientPlayNetworkHandlerMixin { @Shadow @Final private MinecraftClient client; +//#else +//$$@Mixin(value = ClientPlayNetworkHandler.class, remap = false) +//$$public abstract class ClientPlayNetworkHandlerMixin extends ClientCommonNetworkHandler{ +//$$protected ClientPlayNetworkHandlerMixin(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) { +//$$ super(client, connection, connectionState); +//$$ } +//#endif private static boolean isSynced = false; /*