Skip to content

Commit

Permalink
S
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed May 2, 2024
1 parent 44b7e73 commit fcfa14a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/main/java/net/aspw/viaforgeplus/api/ProtocolFixer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class MixinC0FPacketConfirmTransaction {
private boolean accepted;

/**
* @author As_pw
* @author FlorianMichael
* @reason 1.17+ Transaction Fix
*/
@Overwrite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class MixinS32PacketConfirmTransaction {
private boolean field_148893_c;

/**
* @author As_pw
* @author FlorianMichael
* @reason 1.17+ Transaction Fix
*/
@Overwrite
Expand Down

0 comments on commit fcfa14a

Please sign in to comment.