From fcfa14aae2d238f40f2a4e7b53d582964d3c8149 Mon Sep 17 00:00:00 2001 From: Aspw-w <0kcabtuo0@gmail.com> Date: Thu, 2 May 2024 17:19:22 +0900 Subject: [PATCH] S --- .../java/net/aspw/viaforgeplus/api/ProtocolFixer.java | 9 +++++++-- .../forge/mixins/network/MixinNetHandlerPlayClient.java | 2 +- .../packets/client/MixinC0FPacketConfirmTransaction.java | 2 +- .../packets/server/MixinS32PacketConfirmTransaction.java | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/aspw/viaforgeplus/api/ProtocolFixer.java b/src/main/java/net/aspw/viaforgeplus/api/ProtocolFixer.java index 8bbef46..85b7d3f 100644 --- a/src/main/java/net/aspw/viaforgeplus/api/ProtocolFixer.java +++ b/src/main/java/net/aspw/viaforgeplus/api/ProtocolFixer.java @@ -33,11 +33,16 @@ public static void sendFixedAttack(final EntityPlayer entityIn, final Entity tar } } + /** + * @author toidicakhia + */ public static void transactionFix1_17() { final Protocol1_16_4To1_17 protocol = Via.getManager().getProtocolManager().getProtocol(Protocol1_16_4To1_17.class); assert protocol != null; - protocol.registerClientbound(ClientboundPackets1_17.PING, ClientboundPackets1_16_2.WINDOW_CONFIRMATION, wrapper -> {}, true); - protocol.registerServerbound(ServerboundPackets1_16_2.WINDOW_CONFIRMATION, ServerboundPackets1_17.PONG, wrapper -> {}, true); + protocol.registerClientbound(ClientboundPackets1_17.PING, ClientboundPackets1_16_2.WINDOW_CONFIRMATION, wrapper -> { + }, true); + protocol.registerServerbound(ServerboundPackets1_16_2.WINDOW_CONFIRMATION, ServerboundPackets1_17.PONG, wrapper -> { + }, true); } public static boolean newerThanOrEqualsTo1_8() { diff --git a/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/network/MixinNetHandlerPlayClient.java b/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/network/MixinNetHandlerPlayClient.java index 16600d7..2b599bf 100644 --- a/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/network/MixinNetHandlerPlayClient.java +++ b/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/network/MixinNetHandlerPlayClient.java @@ -14,7 +14,7 @@ public class MixinNetHandlerPlayClient { /** - * @author As_pw + * @author FlorianMichael * @reason 1.17+ Transaction fix */ @Inject(method = "handleConfirmTransaction", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/PacketThreadUtil;checkThreadAndEnqueue(Lnet/minecraft/network/Packet;Lnet/minecraft/network/INetHandler;Lnet/minecraft/util/IThreadListener;)V", shift = At.Shift.AFTER), cancellable=true) diff --git a/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/client/MixinC0FPacketConfirmTransaction.java b/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/client/MixinC0FPacketConfirmTransaction.java index 0a80a0d..9a367b6 100644 --- a/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/client/MixinC0FPacketConfirmTransaction.java +++ b/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/client/MixinC0FPacketConfirmTransaction.java @@ -18,7 +18,7 @@ public class MixinC0FPacketConfirmTransaction { private boolean accepted; /** - * @author As_pw + * @author FlorianMichael * @reason 1.17+ Transaction Fix */ @Overwrite diff --git a/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/server/MixinS32PacketConfirmTransaction.java b/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/server/MixinS32PacketConfirmTransaction.java index 60127f9..aafea15 100644 --- a/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/server/MixinS32PacketConfirmTransaction.java +++ b/src/main/java/net/aspw/viaforgeplus/injection/forge/mixins/packets/server/MixinS32PacketConfirmTransaction.java @@ -18,7 +18,7 @@ public class MixinS32PacketConfirmTransaction { private boolean field_148893_c; /** - * @author As_pw + * @author FlorianMichael * @reason 1.17+ Transaction Fix */ @Overwrite