From 0e5e6ee5bc6735afdf2e2c6d44c3861c7d5866a9 Mon Sep 17 00:00:00 2001 From: Wudji <93850120+Wudji@users.noreply.github.com> Date: Sat, 21 Oct 2023 22:25:26 +0800 Subject: [PATCH] update to Minecraft 1.20.2 mod version: 0.9.11-SNAPSHOT --- gradle.properties | 12 ++++++------ .../mixin/MixinClientPlayNetworkHandler.java | 12 ++++++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index aecfb85..2750543 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,18 +2,18 @@ org.gradle.jvmargs=-Xmx1G # Mod Properties -mod_version = 0.9.10-SNAPSHOT +mod_version = 0.9.11-SNAPSHOT maven_group = troy.autofish archives_base_name = autofish # Fabric Properties # check these on https://modmuss50.me/fabric.html or https://fabricmc.net/use -minecraft_version=1.20 -yarn_mappings=1.20+build.1 -loader_version=0.14.21 +minecraft_version=1.20.2 +yarn_mappings=1.20.2+build.4 +loader_version=0.14.23 #Fabric api -fabric_version=0.83.0+1.20 +fabric_version=0.90.0+1.20.2 #Cloth Config API -cloth_config_version=11.0.99 +cloth_config_version=12.0.109 diff --git a/src/main/java/troy/autofish/mixin/MixinClientPlayNetworkHandler.java b/src/main/java/troy/autofish/mixin/MixinClientPlayNetworkHandler.java index 13eaf00..299c609 100644 --- a/src/main/java/troy/autofish/mixin/MixinClientPlayNetworkHandler.java +++ b/src/main/java/troy/autofish/mixin/MixinClientPlayNetworkHandler.java @@ -1,7 +1,13 @@ package troy.autofish.mixin; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.network.ClientAdvancementManager; +import net.minecraft.client.network.ClientCommonNetworkHandler; +import net.minecraft.client.network.ClientConnectionState; import net.minecraft.client.network.ClientPlayNetworkHandler; +import net.minecraft.network.ClientConnection; +import net.minecraft.network.listener.ClientPlayPacketListener; +import net.minecraft.network.listener.TickablePacketListener; import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket; import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket; import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket; @@ -13,9 +19,11 @@ import troy.autofish.FabricModAutofish; @Mixin(ClientPlayNetworkHandler.class) -public class MixinClientPlayNetworkHandler { +public abstract class MixinClientPlayNetworkHandler extends ClientCommonNetworkHandler implements TickablePacketListener, ClientPlayPacketListener { + protected MixinClientPlayNetworkHandler(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) { + super(client, connection, connectionState); + } - @Shadow private MinecraftClient client; @Inject(method = "onPlaySound", at = @At("HEAD")) public void onPlaySound(PlaySoundS2CPacket playSoundS2CPacket_1, CallbackInfo ci) {