0x32 S32PacketConfirmTransaction
Server confirms or rejects an inventory transaction from C0EPacketClickWindow. accepted=false causes client to revert inventory.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| windowId | byte | Window ID of the container |
| actionNumber | short | Transaction action number from the click packet |
| accepted | boolean | Whether the server accepted the click |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Window ID | byte | |
| Action Number | short | |
| Accepted | bool | false = reject + inventory revert |
MCP References
NetHandlerPlayClient.handleConfirmTransaction()Handler Interface
INetHandlerPlayClientNotes
Vanilla Source
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
Deobfuscated MCP 1.8.9 source of S32PacketConfirmTransaction, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S32PacketConfirmTransaction.java) at build time and verified present.
Deep Dive
Role in the protocol
S32PacketConfirmTransaction is the server's reply to each serverbound C0F click confirmation: byte windowId, short actionNumber, boolean accepted. The action number is a per-container short counter the client increments on every click and echoes back; the server replies true when the number matches its own expectation and false when it does not. A false reply marks the window desynced and triggers a full S30 resync. The pair is also the de facto latency probe on post-2018 anti-cheats, which is why it is the most exploited clientbound packet in the Rise 6.x corpus.
Vanilla handling
NetHandlerPlayServer.processConfirmTransaction (lines 886-893 in the bundled sources) compares the echoed action number against the container's expected value: a match replies S32(windowId, action, true), a mismatch replies false and pushes S30 to force the client revert. NetHandlerPlayClient.handleConfirmTransaction resolves the container by window id and treats accepted=false as an order to re-read the window, which is how the server undoes any client-side inventory manipulation.
Why clients touch it
Seven distinct uses in the 10-client corpus. Rise 6.x WatchdogDisabler cancels negative-action S32 confirmations and replays the buffered C0F confirms a second later, a ping-spoof disabler. The 6.2.4 velocity modes (VulcanVelocity, WatchdogVelocity, WatchdogPredictionVelocity) cancel S32 on hit and answer with a deliberately corrupt C0F to desync transaction accounting around knockback. Timer queues S32 while its Watchdog timer mode runs behind a 9,999,999 ms ping spoof. InventorySync rewinds the container transaction counter from S32 values so spoofed clicks keep valid action numbers. Debugger prints every action number. November Recode 2.0's VelocityModule GRIM mode cancels S32 after a velocity cancel, queues the action numbers, and drops the matching C0F on send, a transaction-desync knockback bypass. LiquidSense Dev overwrites handleConfirmTransaction to auto-ack rejected windows through its own send-queue mixin.
Exploit surface
The action counter is a short and the server only checks equality, so fabricating C0F replies is trivial; the subtlety is timing. Buffering C0F and cancelling S32 breaks the correlation the anti-cheat builds between server time and client time, which is the entire point of the Watchdog-era disabler. Cancelling an accepted=false S32 also prevents the inventory revert, which is what keeps ghost-item states alive. The cost is that the server's inventory truth diverges until a legitimate S30 lands, so the exploit is self-limiting.
Server-Side Handling
NetHandlerPlayServer.processConfirmTransaction (lines 886-893) replies S32(windowId, actionNumber, true) when the action matches the container's next expected short, otherwise false followed by updateCraftingInventory, which pushes S30. The container counter is per-window, starts at 0, and must be echoed exactly. The client handler resolves the container by window id; a false reply marks the window desynced and the server's S30 dump reverts the client's slot view.
Protocol Analysis
Wire: byte windowId, short actionNumber, boolean accepted. C0F (serverbound) and S32 (clientbound) share windowId and actionNumber semantics; negative action numbers are legal and several anti-cheats use them as markers, which is why WatchdogDisabler specifically buffers transactions with actionNumber < 0. The pair doubles as a latency reference on Verus and Watchdog-class anti-cheats, so ping spoofers buffer C0F and S32 together with keepalives and flush them as one batch.
Anti-Cheat Landscape
Verus and Watchdog-class anti-cheats fold C0F gaps into their latency model for movement checks. WatchdogDisabler's ping-spoof mode (cancel negative S32, replay all C0F confirms after 1s) and Spicy's Disabler (cancel every C0F, replay one every 500-1250ms) inflate measured ping and break that model. VulcanVelocity cancels S32 only when hurtTime == 10 and answers with a corrupt C0F, a Vulcan-specific knockback desync. The detection risk is not the packet itself but the divergence it causes: servers that resync on rejection eventually expose any client that keeps clicking stale windows.
implementation Implementation Cases
The confirmation half of the C0F/S32 transaction pair and the most exploited clientbound packet in the Rise 6.x corpus. WatchdogDisabler cancels and replays it, the velocity modes corrupt the transaction stream on hit, Timer queues it behind a ping spoof, InventorySync rewinds the action counter, and Debugger prints it. Spicy imports it and never instantiates it. November Recode 2.0 adds a GRIM transaction-queue velocity mode and LiquidSense Dev a handleConfirmTransaction overwrite.
Print every S32 action number to chat as a development aid.
PacketReceiveEvent; on S32, read the action number and push a chat message. Also prints S00 keepalive keys through the same handler.
// ===== FILE: Rise 5.99, dev/rise/module/impl/other/Debugger.java =====
package dev.rise.module.impl.other;
import dev.rise.Rise;
import dev.rise.event.impl.packet.PacketReceiveEvent;
import dev.rise.module.Module;
import dev.rise.module.api.ModuleInfo;
import dev.rise.module.enums.Category;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S00PacketKeepAlive;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
@ModuleInfo(name = "Debugger", description = "Debugs packets", category = Category.OTHER)
public final class Debugger extends Module {
@Override
public void onPacketReceive(final PacketReceiveEvent event) {
final Packet<?> packet = event.getPacket();
if (packet instanceof S32PacketConfirmTransaction) {
final S32PacketConfirmTransaction wrapper = ((S32PacketConfirmTransaction) packet);
Rise.addChatMessage("Transaction | id: " + wrapper.getActionNumber());
}
if (packet instanceof S00PacketKeepAlive) {
final S00PacketKeepAlive wrapper = ((S00PacketKeepAlive) packet);
Rise.addChatMessage("KeepAlive | id: " + wrapper.func_149134_c());
}
}
}
// NOTE (AI): Prints every S32 action number and every S00 keepalive key to chat; the module is a development aid with no gameplay effect.
Watchdog disabler mode: ping-spoof by cancelling negative-action S32 confirmations and replaying all C0F confirms after a one second delay; inventory mode re-wraps C0E clicks.
PacketReceiveEvent: on S07 respawn, reset every queue and flag; if the ping-spoof value is on and S32 has a negative action number and the disabler is not already disabled, buffer the action, reset the stopwatch, and cancel the event. PreMotionEvent: when actions are buffered and one second elapsed, shuffle the list, send C0F(0, action, true) for each via sendPacket (bypassing the bus), and clear. PacketSendEvent: inventory mode cancels C0E for the player inventory when no GUI is open and re-sends it as C16 open-inventory, C0E, C0D close via sendUnregisteredPacket.
// ===== FILE: Rise 6.1.30, com/alan/clients/module/impl/exploit/disabler/WatchdogDisabler.java =====
package com.alan.clients.module.impl.exploit.disabler;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PreMotionEvent;
import com.alan.clients.event.impl.other.TeleportEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import com.alan.clients.module.impl.exploit.Disabler;
import com.alan.clients.value.Mode;
import com.alan.clients.value.impl.BooleanValue;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C0DPacketCloseWindow;
import net.minecraft.network.play.client.C0EPacketClickWindow;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.client.C16PacketClientStatus;
import net.minecraft.network.play.server.S07PacketRespawn;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
import net.minecraft.util.Vec3;
import rip.vantage.commons.util.time.StopWatch;
import java.util.*;
public class WatchdogDisabler extends Mode<Disabler> {
private boolean disabled;
private List<Short> actionNumbers;
private StopWatch transactionStopwatch;
private Queue<Vec3> positionQueue;
private Queue<Packet<?>> transactionQueue;
private Queue<Packet<?>> blinkQueue;
private StopWatch pingStopwatch;
public WatchdogDisabler(String name, Disabler parent) {
super(name, parent);
this.positionQueue = new ArrayDeque<>();
this.transactionQueue = new ArrayDeque<>();
this.pingStopwatch = new StopWatch();
this.blinkQueue = new ArrayDeque<>();
this.actionNumbers = new ArrayList<>();
this.transactionStopwatch = new StopWatch();
}
public final BooleanValue morePackets = new BooleanValue("More Packets", this, false);
public final BooleanValue ban = new BooleanValue("Ping Spoof", this, false);
public final BooleanValue inventory = new BooleanValue("Inventory", this, false);
@EventLink
private final Listener<TeleportEvent> onTeleport = event -> {
};
@EventLink
private final Listener<PreMotionEvent> preMotionEventListener = event -> {
if (ban.getValue()) {
if (!this.actionNumbers.isEmpty() && this.transactionStopwatch.finished(1000L)) {
Collections.shuffle(this.actionNumbers);
this.actionNumbers.forEach(action -> mc.getNetHandler().getNetworkManager().sendPacket(new C0FPacketConfirmTransaction(0, action, true)));
this.actionNumbers.clear();
this.disabled = true;
}
}
};
@EventLink
private final Listener<PacketReceiveEvent> packetReceiveEventListener = event -> {
if (event.getPacket() instanceof S07PacketRespawn) {
this.positionQueue.clear();
this.transactionQueue.clear();
this.pingStopwatch.reset();
this.blinkQueue.clear();
this.transactionStopwatch.reset();
this.actionNumbers.clear();
this.disabled = false;
}
if (ban.getValue()) {
if (event.getPacket() instanceof S32PacketConfirmTransaction) {
final S32PacketConfirmTransaction transaction = (S32PacketConfirmTransaction) event.getPacket();
if (transaction.getActionNumber() < 0) {
if (!this.disabled) {
this.actionNumbers.add(transaction.getActionNumber());
transactionStopwatch.reset();
event.setCancelled(true);
}
}
}
}
};
@EventLink
private final Listener<PacketSendEvent> packetSendEventListener = event -> {
if (inventory.getValue()) {
if (event.getPacket() instanceof C0EPacketClickWindow && ((C0EPacketClickWindow) event.getPacket()).getWindowId() == mc.thePlayer.inventoryContainer.windowId && !(mc.currentScreen instanceof GuiInventory)) {
event.setCancelled();
mc.getNetHandler().getNetworkManager().sendUnregisteredPacket(new C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT));
mc.getNetHandler().getNetworkManager().sendUnregisteredPacket(event.getPacket());
mc.getNetHandler().getNetworkManager().sendUnregisteredPacket(new C0DPacketCloseWindow(mc.thePlayer.inventoryContainer.windowId));
}
}
};
}
// NOTE (AI): Only negative action numbers are buffered; those are the Watchdog marker transactions. The replay sends C0F(0, action, true) for every buffered action after one second, re-acknowledging clicks the server thinks are still in flight. Sending via sendPacket bypasses the event bus, so the replay itself cannot be re-cancelled.
Keep the client container transaction counter aligned with server confirmations.
PacketReceiveEvent; on S32 for the player inventory container, store the action number; if 0 < action < container.transactionID, set transactionID = action + 1. This rewinds the client counter so the next C0E action number is a value the server has not seen yet, which matters when other modules (disablers, ping spoofers) have already consumed actions.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/player/InventorySync.java =====
package com.alan.clients.module.impl.player;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.module.Module;
import com.alan.clients.module.api.Category;
import com.alan.clients.module.api.ModuleInfo;
import net.minecraft.inventory.Container;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
@ModuleInfo(aliases = {"module.player.inventorysync.name"}, description = "module.player.inventorysync.description", category = Category.PLAYER)
public class InventorySync extends Module {
public short action;
@EventLink
public final Listener<PacketReceiveEvent> onPacketReceiveEvent = event -> {
final Packet<?> packet = event.getPacket();
if (packet instanceof S32PacketConfirmTransaction) {
final S32PacketConfirmTransaction wrapper = (S32PacketConfirmTransaction) packet;
final Container inventory = mc.thePlayer.inventoryContainer;
if (wrapper.getWindowId() == inventory.windowId) {
this.action = wrapper.getActionNumber();
if (this.action > 0 && this.action < inventory.transactionID) {
inventory.transactionID = (short) (this.action + 1);
}
}
}
};
}
// NOTE (AI): Rewinding container.transactionID to action + 1 ensures the next C0E click gets an action number the server has not yet seen, which keeps click sync valid while other modules consume or spoof transactions.
Velocity bypass keyed on S32 timing: cancel the confirmation on hit and answer with a corrupt C0F to desync the anti-cheat's transaction accounting.
PacketReceiveEvent; on S32 when hurtTime == 10 (just hit), cancel the confirmation and send a fabricated C0F whose windowId and uid alternate between 1/-1 and -1/1 with the accepted flag toggling. Also cancels or scales S12 velocity and S27 explosion, with the Vulcan Speed mode check deciding between full cancel and 1.9x multiplication.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/combat/velocity/VulcanVelocity.java =====
package com.alan.clients.module.impl.combat.velocity;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.module.impl.combat.Velocity;
import com.alan.clients.module.impl.movement.Speed;
import com.alan.clients.module.impl.movement.Sprint;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.util.player.MoveUtil;
import com.alan.clients.value.Mode;
import com.alan.clients.value.impl.NumberValue;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S27PacketExplosion;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
public final class VulcanVelocity extends Mode<Velocity> {
private final NumberValue horizontal = new NumberValue("Horizontal", this, 0, 0, 100, 1);
private final NumberValue vertical = new NumberValue("Vertical", this, 0, 0, 100, 1);
private boolean transaction = false;
public VulcanVelocity(String name, Velocity parent) {
super(name, parent);
}
@EventLink
public final Listener<PacketReceiveEvent> onPacketReceiveEvent = event -> {
if (getParent().onSwing.getValue() && !mc.thePlayer.isSwingInProgress || event.isCancelled()) return;
final Packet<?> p = event.getPacket();
final double horizontal = this.horizontal.getValue().doubleValue();
final double vertical = this.vertical.getValue().doubleValue();
if (p instanceof S12PacketEntityVelocity) {
final S12PacketEntityVelocity wrapper = (S12PacketEntityVelocity) p;
if (wrapper.getEntityID() == mc.thePlayer.getEntityId()) {
if (horizontal == 0 && vertical == 0) {
if(!(getModule(Speed.class).mode.getValue().getName()=="Vulcan") || !getModule(Speed.class).isEnabled() || !MoveUtil.isMoving()){
event.setCancelled();
} else {
wrapper.motionX *= 1.9;
wrapper.motionY *= 1;
wrapper.motionZ *=1.9;
}
return;
}
wrapper.motionX *= 1;
wrapper.motionY *= 1;
wrapper.motionZ *=1;
event.setPacket(wrapper);
}
}
if (p instanceof S27PacketExplosion) {
final S27PacketExplosion wrapper = (S27PacketExplosion) p;
if (horizontal == 0 && vertical == 0) {
event.setCancelled();
return;
}
wrapper.posX *= horizontal / 100;
wrapper.posY *= vertical / 100;
wrapper.posZ *= horizontal / 100;
event.setPacket(wrapper);
}
if (p instanceof S32PacketConfirmTransaction && mc.thePlayer.hurtTime == 10) {
event.setCancelled(true);
PacketUtil.send(new C0FPacketConfirmTransaction((short) (transaction ? 1 : -1), (short) (transaction ? -1 : 1), transaction));
transaction = !transaction;
}
};
}
// NOTE (AI): The S32 cancel is gated on hurtTime == 10 so it only fires during actual hit processing. The replacement C0F alternates windowId and uid between 1/-1 and -1/1 with the accepted flag toggling, a deliberately corrupt transaction aimed at Vulcan's window accounting.
Watchdog timer mode that hides accelerated ticks behind a massive ping spoof.
With the watchdog value on: PreMotionEvent forces onGround true; PreUpdateEvent calls PingSpoofComponent.spoof(9999999, ...) which buffers keepalives and transactions; PacketSendEvent intercepts S32 on ground, queues it into packetList and cancels the event; StrafeEvent flushes the queued packets via PacketUtil.queue and PingSpoofComponent.dispatch when the attempt flag is set (module key toggles attempt for 200 ms). S12 velocity and S08 teleport are cancelled on receive.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/other/Timer.java =====
package com.alan.clients.module.impl.other;
import com.alan.clients.Client;
import com.alan.clients.component.impl.player.BlinkComponent;
import com.alan.clients.component.impl.player.PingSpoofComponent;
import com.alan.clients.component.impl.render.NotificationComponent;
import com.alan.clients.event.Listener;
import com.alan.clients.event.Priorities;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.input.KeyboardInputEvent;
import com.alan.clients.event.impl.input.MoveInputEvent;
import com.alan.clients.event.impl.motion.JumpEvent;
import com.alan.clients.event.impl.motion.PreMotionEvent;
import com.alan.clients.event.impl.motion.PreUpdateEvent;
import com.alan.clients.event.impl.motion.StrafeEvent;
import com.alan.clients.event.impl.other.TeleportEvent;
import com.alan.clients.event.impl.other.TickEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import com.alan.clients.module.Module;
import com.alan.clients.module.api.Category;
import com.alan.clients.module.api.ModuleInfo;
import com.alan.clients.module.impl.movement.Flight;
import com.alan.clients.module.impl.player.Scaffold;
import com.alan.clients.util.chat.ChatUtil;
import com.alan.clients.util.math.MathUtil;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.util.packet.custom.impl.PlayPongC2SPacket;
import com.alan.clients.util.player.MoveUtil;
import com.alan.clients.util.player.PlayerUtil;
import com.alan.clients.value.impl.BooleanValue;
import com.alan.clients.value.impl.BoundsNumberValue;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import de.florianmichael.vialoadingbase.ViaLoadingBase;
import net.minecraft.client.Minecraft;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.server.S00PacketKeepAlive;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
import net.minecraft.util.Vec3;
import org.apache.commons.compress.utils.Lists;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ThreadLocalRandom;
@ModuleInfo(aliases = {"module.other.timer.name"}, description = "module.other.timer.description", category = Category.MOVEMENT)
public final class Timer extends Module {
private boolean attempt;
public static ConcurrentLinkedQueue<PacketUtil.TimedPacket> packetList = new ConcurrentLinkedQueue<>();
private int ticksSinceTeleport;
private long ticks2;
private boolean teleport;
private final BoundsNumberValue timer =
new BoundsNumberValue("Timer", this, 1, 2, 0.1, 20, 0.05);
public final BooleanValue watchdog = new BooleanValue("Watchdog", this, false);
@EventLink(value = Priorities.MEDIUM)
public final Listener<PreMotionEvent> onPreMotionEvent = event -> {
if(!watchdog.getValue()) {
mc.timer.timerSpeed = (float) MathUtil.getRandom(timer.getValue().floatValue(), timer.getSecondValue().floatValue());
} else if (watchdog.getValue()){
event.setOnGround(true);
if(attempt && System.currentTimeMillis() > ticks2){
mc.thePlayer.motionX *= 0;
mc.thePlayer.motionZ *= 0;
ticks2 = 0;
getModule(Timer.class).toggle();
}
}
};
@EventLink(value = Priorities.HIGH)
public final Listener<PreUpdateEvent> onHighPreUpdate = event -> {
if(watchdog.getValue()) {
PingSpoofComponent.spoof(9999999, false, false, false, false, true);
mc.thePlayer.safeWalk = true;
}
};
@EventLink
public final Listener<TickEvent> onTick = event -> {
if(watchdog.getValue() && !attempt) {
if (mc.thePlayer.onGround) {
ticksSinceTeleport++;
double x = mc.thePlayer.posX;
double y = mc.thePlayer.posY;
double z = mc.thePlayer.posZ;
float yaw = mc.thePlayer.rotationYaw;
float pitch = mc.thePlayer.rotationPitch;
PacketUtil.send(new C03PacketPlayer.C04PacketPlayerPosition(x, y, z, true));
PacketUtil.send(new C03PacketPlayer.C04PacketPlayerPosition(x, y-0.0000000000000001, z, true));
PacketUtil.send(new C03PacketPlayer.C04PacketPlayerPosition(x, y+ 0.07, z, true));
PacketUtil.send(new C03PacketPlayer.C04PacketPlayerPosition(x, y, z, true));
mc.timer.timerSpeed = (float)(timer.getValue().floatValue());
teleport = true;
} else if(watchdog.getValue()){
// this.mc.timer.timerSpeed = 1;
// MoveUtil.stop();
}
}
};
@EventLink
public final Listener<MoveInputEvent> onMove = event -> {
if(watchdog.getValue()) {
if (mc.thePlayer.onGround && ticksSinceTeleport == 0) {
MoveUtil.stop();
}
}
};
@EventLink
public final Listener<StrafeEvent> onStrafe = event -> {
if(watchdog.getValue()) {
if (attempt) {
MoveUtil.stop();
this.mc.timer.timerSpeed = 1f;
if (mc.thePlayer.onGround) {
packetList.forEach(timedPacket -> PacketUtil.queue(timedPacket.getPacket()));
packetList.clear();
PingSpoofComponent.dispatch();
// mc.thePlayer.jump();
}
}
}
};
@EventLink(value = Priorities.VERY_LOW)
public final Listener<PacketSendEvent> onPacketSend = event -> {
if(watchdog.getValue()) {
if (mc.thePlayer.onGround) {
Packet<?> packet = event.getPacket();
if (packet instanceof S32PacketConfirmTransaction) {
packetList.add(new PacketUtil.TimedPacket(packet));
event.setCancelled();
}
} else {
// packetList.forEach(timedPacket -> PacketUtil.queue(timedPacket.getPacket()));
// packetList.clear();
}
}
};
@EventLink()
public final Listener<PacketReceiveEvent> onPacketReceiveEvent = event -> {
if(watchdog.getValue()) {
final Packet<?> p = event.getPacket();
if (p instanceof S12PacketEntityVelocity) {
final S12PacketEntityVelocity wrapper = (S12PacketEntityVelocity) p;
event.setCancelled();
}
if (p instanceof S08PacketPlayerPosLook) {
event.setCancelled();
}
}
};
@EventLink(value = Priorities.VERY_HIGH)
public final Listener<TeleportEvent> onTeleport = event -> {
};
@EventLink
public final Listener<JumpEvent> onJump = event -> {
if(watchdog.getValue()) {
event.setCancelled();
}
};
@Override
public void onEnable() {
if(watchdog.getValue()) {
mc.thePlayer.stepHeight = 0.0F;
attempt = false;
ticksSinceTeleport = 0;
teleport = false;
ticks2 = 0;
}
}
@Override
public void onDisable() {
if (this.mc.timer.timerSpeed != 1) {
this.mc.timer.timerSpeed = 1;
}
if(watchdog.getValue()){
mc.thePlayer.stepHeight = 0.6F;
mc.thePlayer.motionX *= 0;
mc.thePlayer.motionZ *= 0;
}
}
@EventLink
public final Listener<KeyboardInputEvent> onKey = event -> {
if (watchdog.getValue() && event.getKeyCode() == getModule(Timer.class).getKey() && !attempt) {
ticks2 = System.currentTimeMillis() + 200;
attempt = true;
ChatUtil.display("sent");
event.setCancelled();
}
if (watchdog.getValue() && attempt) {
event.setCancelled();
}
};
}
// NOTE (AI): S32 confirmations are queued only while on ground; the flush happens on the next strafe cycle alongside PingSpoofComponent.dispatch. The 9,999,999 ms ping spoof makes the server's latency estimates absurd, which is what masks the timer acceleration.
Hypixel disabler: buffer every serverbound C0F and replay them slowly to inflate measured ping.
EventSendPacket: cancel every C0F and park it in a static list; EventUpdate: every 500-1250 ms send the oldest buffered C0F via sendPacketNoEvent; onEnable warns the user to relog. Also cancels C0C input on send and periodically re-sends C13 abilities with a random fly speed. The S32PacketConfirmTransaction import at line 30 is never used: the module's logic is purely serverbound C0F delay, with commented-out experiments in corrupting C0F fields.
// ===== FILE: Spicy, info/spicyclient/modules/player/Disabler.java =====
package info.spicyclient.modules.player;
import java.util.ArrayList;
import java.util.Random;
import org.lwjgl.input.Keyboard;
import info.spicyclient.SpicyClient;
import info.spicyclient.chatCommands.Command;
import info.spicyclient.events.Event;
import info.spicyclient.events.listeners.EventPacket;
import info.spicyclient.events.listeners.EventSendPacket;
import info.spicyclient.events.listeners.EventUpdate;
import info.spicyclient.modules.Module;
import info.spicyclient.notifications.Color;
import info.spicyclient.notifications.NotificationManager;
import info.spicyclient.notifications.Type;
import info.spicyclient.util.MovementUtils;
import info.spicyclient.util.Timer;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.network.Packet;
import net.minecraft.network.handshake.client.C00Handshake;
import net.minecraft.network.login.server.S00PacketDisconnect;
import net.minecraft.network.play.client.C00PacketKeepAlive;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C0CPacketInput;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.client.C13PacketPlayerAbilities;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
public class Disabler extends Module {
public Disabler() {
super("Disabler", Keyboard.KEY_NONE, Category.PLAYER);
}
public static transient boolean watchdog = false;
public static transient ArrayList<C0FPacketConfirmTransaction> C0FPackets = new ArrayList<C0FPacketConfirmTransaction>();
public static transient Timer ping = new Timer();
@Override
public void onEnable() {
NotificationManager.getNotificationManager().createNotification("Relog for the disabler to take effect", "", true, 5000, Type.INFO, Color.PINK);
watchdog = false;
}
@Override
public void onDisable() {
watchdog = false;
for (C0FPacketConfirmTransaction p : C0FPackets) {
mc.getNetHandler().getNetworkManager().sendPacketNoEvent(p);
}
C0FPackets.clear();
}
@Override
public void onEvent(Event e) {
if (e instanceof EventUpdate && e.isPre()) {
this.additionalInformation = "Hypixel";
PlayerCapabilities playerCapabilities = new PlayerCapabilities();
playerCapabilities.isFlying = true;
playerCapabilities.allowFlying = true;
//playerCapabilities.setFlySpeed((float) ((Math.random() * (9.0 - 0.1)) + 0.1));
playerCapabilities.setFlySpeed((float) ((Math.random() * (9.0 - 0.1)) + 0.1));
playerCapabilities.isCreativeMode = true;
mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C13PacketPlayerAbilities(playerCapabilities));
// Added this
if (SpicyClient.config.fly.isEnabled()) {
mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C13PacketPlayerAbilities(playerCapabilities));
}
if (ping.hasTimeElapsed(500 + (new Random()).nextInt(750), true) && C0FPackets.size() > 0) {
mc.getNetHandler().getNetworkManager().sendPacketNoEvent(C0FPackets.get(0));
C0FPackets.remove(0);
}
}
if (e instanceof EventPacket && e.isPre()) {
if (((EventPacket)e).packet instanceof S00PacketDisconnect) {
C0FPackets.clear();
}
}
if (e instanceof EventSendPacket && e.isPre()) {
EventSendPacket event = (EventSendPacket) e;
if (event.packet instanceof C00Handshake) {
C0FPackets.clear();
}
if (event.packet instanceof C0FPacketConfirmTransaction) {
C0FPacketConfirmTransaction packetConfirmTransaction = (C0FPacketConfirmTransaction)event.packet;
//mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C0FPacketConfirmTransaction(2147483647, packetConfirmTransaction.getUid(), false));
//mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C0FPacketConfirmTransaction(1147483647, packetConfirmTransaction.getUid(), false));
//packetConfirmTransaction.setAccepted(new Random().nextBoolean());
//packetConfirmTransaction.setWindowId(Integer.MIN_VALUE + new Random().nextInt(1000));
//packetConfirmTransaction.setUid(Short.MAX_VALUE);
//mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C0FPacketConfirmTransaction(Integer.MIN_VALUE, Short.MAX_VALUE, true));
C0FPackets.add(packetConfirmTransaction);
e.setCanceled(true);
}
if (event.packet instanceof C00PacketKeepAlive) {
//mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C00PacketKeepAlive(-2147483648 + (new Random()).nextInt(100)));
//e.setCanceled(true);
}
if (event.packet instanceof C0CPacketInput) {
e.setCanceled(true);
}
}
}
}
// NOTE (AI): S32PacketConfirmTransaction is imported (line 30) but never instantiated; the module's real logic is the C0F buffer. The commented-out mutations (setAccepted, setWindowId, setUid) show the author experimented with corrupting C0F fields and left the import behind.
GRIM velocity bypass: after cancelling knockback, cancel the server's S32 confirmations and the matching outgoing C0F confirms to desync the anti-cheat's transaction-based movement timing.
PacketReceiveEvent: on S12 for the local player, the CANCEL/GRIM/VULCAN modes cancel it and set funny. While funny, each S32PacketConfirmTransaction is cancelled and its action number queued. PacketSendEvent: an outgoing C0F whose uid is in the queue is cancelled (and removed from the queue); the EventUpdate listener clears funny once the queue drains. VULCAN mode instead cancels the next C0F after a cancelled S12.
// ===== FILE: November Recode 2.0, feature/module/impl/combat/VelocityModule.java =====
/* November.lol © 2023 */
package lol.november.feature.module.impl.combat;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import lol.november.feature.module.Category;
import lol.november.feature.module.Module;
import lol.november.feature.module.Register;
import lol.november.feature.setting.Setting;
import lol.november.listener.bus.Listener;
import lol.november.listener.bus.Subscribe;
import lol.november.listener.event.net.EventPacket;
import lol.november.listener.event.player.EventUpdate;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
/**
* @author Gavin
* @since 2.0.0
*/
@Register(
name = "Velocity",
description = "Reduces or cancels out taken velocity",
category = Category.COMBAT
)
public class VelocityModule extends Module {
private final Setting<Mode> mode = new Setting<>("Mode", Mode.CANCEL);
private final Setting<Float> horizontal = new Setting<>(
() -> mode.getValue() == Mode.REDUCE || mode.getValue() == Mode.REVERSE,
"Horizontal",
50.0f,
0.01f,
0.0f,
200.0f
);
private final Setting<Float> vertical = new Setting<>(
() -> mode.getValue() == Mode.REDUCE || mode.getValue() == Mode.REVERSE,
"Vertical",
50.0f,
0.01f,
0.0f,
200.0f
);
private final Queue<Short> transactionQueue = new ConcurrentLinkedQueue<>();
private boolean funny;
@Override
public void disable() {
super.disable();
funny = false;
transactionQueue.clear();
}
@Subscribe
private final Listener<EventUpdate> update = event -> {
if (mode.getValue() == Mode.GRIM) {
// finish trolling
if (transactionQueue.isEmpty() && funny) funny = false;
}
};
@Subscribe
private final Listener<EventPacket.In> packetIn = event -> {
if (mc.thePlayer == null || mc.theWorld == null) {
// basic resets
funny = false;
if (!transactionQueue.isEmpty()) transactionQueue.clear();
return;
}
if (event.get() instanceof S12PacketEntityVelocity packet) {
if (packet.getEntityID() != mc.thePlayer.getEntityId()) return;
switch (mode.getValue()) {
case REDUCE, REVERSE -> {
packet.setMotionX(
(int) (packet.getMotionX() * (horizontal.getValue() / 100.0f))
);
packet.setMotionY(
(int) (packet.getMotionY() * (vertical.getValue() / 100.0f))
);
packet.setMotionZ(
(int) (packet.getMotionZ() * (horizontal.getValue() / 100.0f))
);
if (mode.getValue() == Mode.REVERSE) {
packet.setMotionX(-packet.getMotionX());
packet.setMotionY(-packet.getMotionY());
packet.setMotionZ(-packet.getMotionZ());
}
}
case CANCEL, GRIM, VULCAN -> {
event.setCanceled(true);
if (
mode.getValue() == Mode.GRIM || mode.getValue() == Mode.VULCAN
) funny = true;
}
case INTAVE -> {
// TODO: i have no clue
}
case WATCHDOG -> {
// TODO: frappy or plus add this i dont have alts
}
case WATCHDOG_SAFE -> {
event.setCanceled(true);
if (mc.thePlayer.onGround) {
// as far as im aware, this should work
mc.thePlayer.motionY += (double) packet.getMotionY() / 8000.0;
}
}
}
} else if (event.get() instanceof S32PacketConfirmTransaction packet) {
if (mode.getValue() == Mode.GRIM) {
if (!funny) return;
event.setCanceled(true);
transactionQueue.add(packet.getActionNumber());
}
}
};
@Subscribe
private final Listener<EventPacket.Out> packetOut = event -> {
if (event.get() instanceof C0FPacketConfirmTransaction packet) {
if (mode.getValue() == Mode.GRIM) {
if (!funny || transactionQueue.isEmpty()) return;
// if the queue contains our transaction UID, cancel
if (transactionQueue.remove(packet.getUid())) event.setCanceled(true);
} else if (mode.getValue() == Mode.VULCAN) {
// this works on older versions of vulcan
if (funny) {
event.setCanceled(true);
funny = false;
}
}
}
};
private enum Mode {
REDUCE,
REVERSE,
CANCEL,
GRIM,
INTAVE,
VULCAN,
WATCHDOG,
WATCHDOG_SAFE,
}
}
// NOTE (AI): The GRIM mode pairs every cancelled S32 with its own outgoing C0F uid, so the server never receives the confirm it requested. WATCHDOG and INTAVE modes are marked unfinished in the source.
Re-implement handleConfirmTransaction so every rejected S32 is auto-answered with a true C0F through the client's own send-queue mixin.
@Overwrite of handleConfirmTransaction: resolve the container by windowId (0 = inventoryContainer, otherwise openContainer), and when the packet says not accepted, addToSendQueue(new C0FPacketConfirmTransaction(windowId, actionNumber, true)) via Minecraft.getMinecraft().getNetHandler(). Semantics match vanilla; routing through getNetHandler().addToSendQueue means the confirm passes the class's own senpacket HEAD inject, which fires PacketSenEvent and lets modules cancel or delay it.
// ===== FILE: LiquidSense Dev, net/ccbluex/liquidbounce/injection/forge/mixins/network/MixinNetHandlerPlayClient.java =====
/*
* LiquidBounce Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
* https://github.com/CCBlueX/LiquidBounce/
*/
package net.ccbluex.liquidbounce.injection.forge.mixins.network;
import io.netty.buffer.Unpooled;
import net.ccbluex.liquidbounce.LiquidBounce;
import net.ccbluex.liquidbounce.event.EntityMovementEvent;
import net.ccbluex.liquidbounce.event.PacketSenEvent;
import net.ccbluex.liquidbounce.features.module.modules.movement.Fly;
import net.ccbluex.liquidbounce.features.special.AntiForge;
import net.ccbluex.liquidbounce.utils.ClientUtils;
import net.minecraft.client.ClientBrandRetriever;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.GuiDownloadTerrain;
import net.minecraft.client.multiplayer.PlayerControllerMP;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.network.*;
import net.minecraft.network.play.client.C0FPacketConfirmTransaction;
import net.minecraft.network.play.client.C17PacketCustomPayload;
import net.minecraft.network.play.client.C19PacketResourcePackStatus;
import net.minecraft.network.play.server.S01PacketJoinGame;
import net.minecraft.network.play.server.S14PacketEntity;
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
import net.minecraft.network.play.server.S48PacketResourcePackSend;
import net.minecraft.world.WorldSettings;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.net.URI;
import java.net.URISyntaxException;
@Mixin(NetHandlerPlayClient.class)
public abstract class MixinNetHandlerPlayClient {
@Shadow
@Final
private NetworkManager netManager;
@Shadow
private Minecraft gameController;
@Shadow
private WorldClient clientWorldController;
@Shadow
public int currentServerMaxPlayers;
@Inject(method = "handleResourcePack", at = @At("HEAD"), cancellable = true)
private void handleResourcePack(final S48PacketResourcePackSend p_handleResourcePack_1_, final CallbackInfo callbackInfo) {
final String url = p_handleResourcePack_1_.getURL();
final String hash = p_handleResourcePack_1_.getHash();
try {
final String scheme = new URI(url).getScheme();
final boolean isLevelProtocol = "level".equals(scheme);
if(!"http".equals(scheme) && !"https".equals(scheme) && !isLevelProtocol)
throw new URISyntaxException(url, "Wrong protocol");
if(isLevelProtocol && (url.contains("..") || !url.endsWith("/resources.zip")))
throw new URISyntaxException(url, "Invalid levelstorage resourcepack path");
}catch(final URISyntaxException e) {
ClientUtils.getLogger().error("Failed to handle resource pack", e);
netManager.sendPacket(new C19PacketResourcePackStatus(hash, C19PacketResourcePackStatus.Action.FAILED_DOWNLOAD));
callbackInfo.cancel();
}
}
@Inject(method = "handleJoinGame", at = @At("HEAD"), cancellable = true)
private void handleJoinGameWithAntiForge(S01PacketJoinGame packetIn, final CallbackInfo callbackInfo) {
if(!AntiForge.enabled || !AntiForge.blockFML || Minecraft.getMinecraft().isIntegratedServerRunning())
return;
PacketThreadUtil.checkThreadAndEnqueue(packetIn, (NetHandlerPlayClient) (Object) this, gameController);
this.gameController.playerController = new PlayerControllerMP(gameController, (NetHandlerPlayClient) (Object) this);
this.clientWorldController = new WorldClient((NetHandlerPlayClient) (Object) this, new WorldSettings(0L, packetIn.getGameType(), false, packetIn.isHardcoreMode(), packetIn.getWorldType()), packetIn.getDimension(), packetIn.getDifficulty(), this.gameController.mcProfiler);
this.gameController.gameSettings.difficulty = packetIn.getDifficulty();
this.gameController.loadWorld(this.clientWorldController);
this.gameController.thePlayer.dimension = packetIn.getDimension();
this.gameController.displayGuiScreen(new GuiDownloadTerrain((NetHandlerPlayClient) (Object) this));
this.gameController.thePlayer.setEntityId(packetIn.getEntityId());
this.currentServerMaxPlayers = packetIn.getMaxPlayers();
this.gameController.thePlayer.setReducedDebug(packetIn.isReducedDebugInfo());
this.gameController.playerController.setGameType(packetIn.getGameType());
this.gameController.gameSettings.sendSettingsToServer();
this.netManager.sendPacket(new C17PacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).writeString(ClientBrandRetriever.getClientModName())));
callbackInfo.cancel();
}
@Inject(method = "handleEntityMovement", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/Entity;onGround:Z"))
private void handleEntityMovementEvent(S14PacketEntity packetIn, final CallbackInfo callbackInfo) {
final Entity entity = packetIn.getEntity(this.clientWorldController);
if(entity != null)
LiquidBounce.eventManager.callEvent(new EntityMovementEvent(entity));
}
@Inject(method = "addToSendQueue", at = @At("HEAD"), cancellable = true)
private void senpacket(Packet<?> packet, final CallbackInfo callbackInfo) {
final PacketSenEvent event = new PacketSenEvent(packet);
LiquidBounce.eventManager.callEvent(event);
if (event.isCancelled()) {
callbackInfo.cancel();
}
}
@Overwrite
public void handleConfirmTransaction(S32PacketConfirmTransaction packetIn) {
PacketThreadUtil.checkThreadAndEnqueue((Packet)packetIn, (INetHandler)this, this.gameController);
Container container = null;
EntityPlayerSP entityplayer = Minecraft.getMinecraft().thePlayer;
if (packetIn.getWindowId() == 0) {
container = entityplayer.inventoryContainer;
} else if (packetIn.getWindowId() == entityplayer.openContainer.windowId) {
container = entityplayer.openContainer;
}
if (container != null && !packetIn.func_148888_e()) {
Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C0FPacketConfirmTransaction(packetIn.getWindowId(), packetIn.getActionNumber(), true));
}
}
}
// NOTE (AI): The overwrite is a faithful re-implementation of the vanilla handler, but it sends through getNetHandler().addToSendQueue, which this same mixin class injects at HEAD to fire PacketSenEvent, putting the auto-confirm on the event bus.
anticheat Anti-Cheat Checks
S32 is the server's transaction confirmation, the oldest reliable latency probe in the protocol: the server sends a transaction id, the client echoes it back, and the round trip is the ping. Modern anticheats have turned the echo into a transaction clock (Grim sends a transaction before and after sensitive packets, Hydro schedules work on frames), while classic anticheats use it as a ping spoof detector by comparing transaction latency against keep-alive latency. Because the client must echo the exact id, S32 is also where ping-spoof disablers attack the anticheat.
Runs the transaction clock: sends transaction ids the client must echo, tracks send and receive order, and fires the transaction events the whole anticheat schedules on.
On the OUT side, records each sent window-confirmation (negative ids Grim generates, and the ping packet on modern versions) into a sent-map and increments lastTransactionSent. On the IN side, only accepts replies whose id was actually sent, marks the transaction valid, cancels the echo to keep packet limiters happy, and fires the send/receive events that checks, setback teleports and velocity handlers all schedule against.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/events/packets/PacketPingListener.java =====
package ac.grim.grimac.events.packets;
import ac.grim.grimac.GrimAPI;
import ac.grim.grimac.api.event.events.GrimTransactionReceivedEvent;
import ac.grim.grimac.api.event.events.GrimTransactionSendEvent;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.data.ShortToLongPair;
import com.github.retrooper.packetevents.event.PacketListenerAbstract;
import com.github.retrooper.packetevents.event.PacketListenerPriority;
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
import com.github.retrooper.packetevents.event.PacketSendEvent;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientPong;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientWindowConfirmation;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerPing;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerWindowConfirmation;
public class PacketPingListener extends PacketListenerAbstract {
private static final GrimTransactionSendEvent.Channel SEND_CHANNEL = GrimAPI.INSTANCE.getEventBus().get(GrimTransactionSendEvent.class);
private static final GrimTransactionReceivedEvent.Channel RECEIVED_CHANNEL = GrimAPI.INSTANCE.getEventBus().get(GrimTransactionReceivedEvent.class);
// Must listen on LOWEST (or maybe low) to stop Tuinity packet limiter from kicking players for transaction/pong spam
public PacketPingListener() {
super(PacketListenerPriority.LOWEST);
}
@Override
public void onPacketReceive(PacketReceiveEvent event) {
if (event.getPacketType() == PacketType.Play.Client.WINDOW_CONFIRMATION) {
GrimPlayer player = GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser());
if (player == null) return;
player.packetStateData.lastTransactionPacketWasValid = false;
WrapperPlayClientWindowConfirmation transaction = new WrapperPlayClientWindowConfirmation(event);
short id = transaction.getActionId();
// Vanilla always uses an ID starting from 1
// Check if we sent this packet before cancelling it
if (id <= 0 && player.addTransactionResponse(id)) {
player.packetStateData.lastTransactionPacketWasValid = true;
boolean shouldCancel = !GrimAPI.INSTANCE.getConfigManager().isDisablePongCancelling();
// Not needed for vanilla as vanilla ignores this packet, needed for packet limiters
event.setCancelled(shouldCancel);
RECEIVED_CHANNEL.fire(player, id, shouldCancel, event.getTimestamp());
}
}
if (event.getPacketType() == PacketType.Play.Client.PONG) {
WrapperPlayClientPong pong = new WrapperPlayClientPong(event);
GrimPlayer player = GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser());
if (player == null) return;
player.packetStateData.lastTransactionPacketWasValid = false;
int id = pong.getId();
// If it wasn't below 0, it wasn't us
// If it wasn't in short range, it wasn't us either
if (id == (short) id) {
short shortID = (short) id;
if (player.addTransactionResponse(shortID)) {
player.packetStateData.lastTransactionPacketWasValid = true;
boolean shouldCancel = !GrimAPI.INSTANCE.getConfigManager().isDisablePongCancelling();
// Not needed for vanilla as vanilla ignores this packet, needed for packet limiters
event.setCancelled(shouldCancel);
RECEIVED_CHANNEL.fire(player, id, shouldCancel, event.getTimestamp());
}
}
}
}
@Override
public void onPacketSend(PacketSendEvent event) {
if (event.getPacketType() == PacketType.Play.Server.WINDOW_CONFIRMATION) {
WrapperPlayServerWindowConfirmation confirmation = new WrapperPlayServerWindowConfirmation(event);
short id = confirmation.getActionId();
//
GrimPlayer player = GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser());
if (player == null) return;
player.packetStateData.lastServerTransWasValid = false;
// Vanilla always uses an ID starting from 1
if (id <= 0) {
if (player.didWeSendThatTrans.remove(id)) {
player.packetStateData.lastServerTransWasValid = true;
player.transactionsSent.add(new ShortToLongPair(id, System.nanoTime()));
player.lastTransactionSent.getAndIncrement();
SEND_CHANNEL.fire(player, id, event.getTimestamp());
}
}
}
if (event.getPacketType() == PacketType.Play.Server.PING) {
WrapperPlayServerPing pong = new WrapperPlayServerPing(event);
int id = pong.getId();
//
GrimPlayer player = GrimAPI.INSTANCE.getPlayerDataManager().getPlayer(event.getUser());
if (player == null) return;
player.packetStateData.lastServerTransWasValid = false;
// Check if in the short range, we only use short range
if (id == (short) id) {
// Cast ID twice so we can use the list
short shortID = (short) id;
if (player.didWeSendThatTrans.remove(shortID)) {
player.packetStateData.lastServerTransWasValid = true;
player.transactionsSent.add(new ShortToLongPair(shortID, System.nanoTime()));
player.lastTransactionSent.getAndIncrement();
SEND_CHANNEL.fire(player, id, event.getTimestamp());
}
}
}
}
}
// NOTE (AI): Grim listens at LOWEST priority specifically so Tuinity's packet limiter does not kick players for the transaction spam the anticheat itself generates.Flags ping spoofing as a divergence between the transaction-measured ping and the keep-alive-measured ping.
On each flying packet, reads the transaction ping (from the ConnectionManager echo map) and the keep-alive ping. If the transaction ping exceeds the keep-alive ping by more than 50ms outside lag, teleport, tps and chunk exemptions, and after the first 10 ticks, the check fails.
// ===== FILE: ElevatedDev-Frequency, src/main/java/xyz/elevated/frequency/check/impl/pingspoof/PingSpoofA.java =====
package xyz.elevated.frequency.check.impl.pingspoof;
import xyz.elevated.frequency.check.CheckData;
import xyz.elevated.frequency.check.type.PacketCheck;
import xyz.elevated.frequency.data.PlayerData;
import xyz.elevated.frequency.exempt.type.ExemptType;
import xyz.elevated.frequency.wrapper.impl.client.WrappedPlayInFlying;
@CheckData(name = "PingSpoof (A)")
public final class PingSpoofA extends PacketCheck {
public PingSpoofA(final PlayerData playerData) {
super(playerData);
}
@Override
public void process(final Object object) {
if (object instanceof WrappedPlayInFlying) {
final long transactionPing = playerData.getTransactionPing().get();
final long keepAlivePing = playerData.getKeepAlivePing().get();
final boolean joined = playerData.getTicks().get() - playerData.getJoined().get() < 10;
final boolean exempt = this.isExempt(ExemptType.LAGGING, ExemptType.TELEPORTING, ExemptType.TPS, ExemptType.CHUNK);
if (!exempt && !joined && transactionPing > keepAlivePing && Math.abs(transactionPing - keepAlivePing) > 50) fail();
}
}
}
// NOTE (AI): The two clocks diverge because spoofers usually target the transaction stream, the one anticheats historically trusted.Sends its own random transaction probes and compares the echo delay against the reported ping to expose spoofed latency.
On the first flying packet after a transaction, sends a server-bound transaction with a random id and sets the sent flag. When the client echoes it, the check compares the round-trip delay against the player's reported NMS ping: if the reported ping is more than 2.75 times the measured delay plus 50ms, it flags with the spoofed millisecond difference.
// ===== FILE: AimbotPvP-azure-anticheat, src/main/java/us/skidrevenant/azure/check/checks/misc/PingSpoof.java =====
package us.skidrevenant.azure.check.checks.misc;
import net.minecraft.server.v1_8_R3.*;
import us.skidrevenant.azure.check.Check;
import us.skidrevenant.azure.stats.PlayerStats;
import us.skidrevenant.azure.util.entity.NMSUtil;
import us.skidrevenant.azure.util.math.MathUtil;
/**
* @author SkidRevenant
* at 28/05/2018
*/
public class PingSpoof extends Check {
private boolean sent;
public PingSpoof(PlayerStats player) {
super(player);
}
@Override
public void onPacketReceiving(Class<? extends Packet> type, Packet packet) {
if (packet instanceof PacketPlayInTransaction) {
sent = false;
long delay = System.currentTimeMillis() - player.getLastMovePacket();
int playerPing = NMSUtil.getNmsPlayer(player.getBukkitPlayer()).ping;
if (delay < 20L) {
return;
}
if (playerPing > (delay + 50L) * 2.75) {
this.onViolation(String.format("PingSpoof (+%dms)", playerPing - delay), 60000L, 0);
}
} else if (packet instanceof PacketPlayInFlying) {
if (sent) {
return;
}
NMSUtil.getNmsPlayer(player.getBukkitPlayer()).playerConnection.sendPacket(new PacketPlayOutTransaction(0, (short) MathUtil.RANDOM.nextInt(1000), false));
sent = true;
}
}
}
// NOTE (AI): The check self-generates the probe ids instead of relying on the vanilla transaction stream, which makes spoofing the expected ids harder.Schedules anticheat work on the transaction confirmations using Pledge frames, and kicks on frame errors.
Registers pre and post actions against Pledge frame ids: confirmPre schedules work on the first id of a frame, confirmPost on the second. When a transaction frame arrives, the tracker runs every action scheduled for that id; missing or incomplete frames are handled as error events that kick the player.
// ===== FILE: Incognitolol-Hydro, src/main/java/integral/studios/hydro/model/tracker/impl/TransactionTracker.java =====
package integral.studios.hydro.model.tracker.impl;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import integral.studios.hydro.Hydro;
import integral.studios.hydro.model.tracker.Tracker;
import dev.thomazz.pledge.api.PacketFrame;
import dev.thomazz.pledge.api.event.ErrorType;
import dev.thomazz.pledge.api.event.PacketFrameErrorEvent;
import dev.thomazz.pledge.api.event.PacketFrameReceiveEvent;
import dev.thomazz.pledge.api.event.ReceiveType;
import integral.studios.hydro.model.PlayerData;
import lombok.Getter;
@Getter
public class TransactionTracker extends Tracker {
private final Multimap<Short, Runnable> scheduledTransactions = ArrayListMultimap.create();
private final int splitCounter = 0;
public TransactionTracker(PlayerData playerData) {
super(playerData);
}
public void handleTransaction(PacketFrameReceiveEvent event) {
short id = (short) (event.getType() == ReceiveType.RECEIVE_START
? event.getFrame().getId1()
: event.getFrame().getId2()
);
if (scheduledTransactions.containsKey(id)) {
for (Runnable runnable : scheduledTransactions.removeAll(id)) {
runnable.run();
}
}
}
public void handleTransactionError(PacketFrameErrorEvent event) {
if (event.getType() == ErrorType.MISSING_FRAME) {
// KICK THE PLAYER
}
if (event.getType() == ErrorType.INCOMPLETE_FRAME) {
// KICK THE PLAYER
}
}
public void confirmPre(Runnable runnable) {
try {
PacketFrame frame = Hydro.get().getPledge().getOrCreateFrame(playerData.getBukkitPlayer());
scheduledTransactions.put((short) frame.getId1(), runnable);
} catch (Exception ignored) {
}
}
public void confirmPost(Runnable runnable) {
PacketFrame frame = Hydro.get().getPledge().getOrCreateFrame(playerData.getBukkitPlayer());
if (frame == null) {
return;
}
scheduledTransactions.put((short) frame.getId2(), runnable);
}
}
// NOTE (AI): Hydro is the only corpus anticheat that delegates the transaction clock to Pledge instead of implementing the echo map itself.Related Packets
Wiki Cross-Reference
Server reply to C0F click: byte windowId, short actionNumber, bool accepted. Accepted=false rejects the click and the client reverts its inventory view.
After a reject the server pushes a full S30 WindowItems resync so client slots match server truth. Action numbers are per-window short counters echoed exactly.
MCP 1.8.9 S32PacketConfirmTransaction implements Packet
1.8.9 callers: NetHandlerPlayServer.processClickWindow sends new S32PacketConfirmTransaction (line 1031): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/network/NetHandlerPlayServer.java
Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.
Vanilla Internals
Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.
Module Analyses Using S32PacketConfirmTransaction
Full source walkthroughs of the modules and anti-cheats that use this packet.