Spicy Wtap module 2 files, 79 lines

Spicy Wtap: Full Source Analysis

Spicy's Wtap attaches the sprint reset directly to the attack packet.

info/spicyclient/modules/combat/Wtap.java · GitHub source ↗

Published 2026-08-12 · Updated 2026-08-12

Packets This Module Uses

Analysis

Overview

Spicy's Wtap attaches the sprint reset directly to the attack packet. A single EventSendPacket handler watches the outgoing stream, and when it sees a C02PacketUseEntity with the ATTACK action while the food level is above 6, it captures the current sprint state, pushes a C0BPacketEntityAction STOP_SPRINTING followed by START_SPRINTING onto the send queue, and restores the local sprint flag. The pair trails the C02 and re-arms the server-side sprint state for the following hit, which is what keeps the vanilla sprint knockback multiplier applied to consecutive attacks. Unlike Rise's tick-driven burst, Spicy emits exactly one pair per attack, gated by the same food rule vanilla applies to sprinting, and the handler never fires on anything but C02 ATTACK packets, so the enqueued pair cannot re-enter the handler.

Architecture

The module registers one handler on the EventSendPacket bus with a pre-phase check. onEvent casts the packet, tests instanceof C02PacketUseEntity, reads getAction() and requires it to equal Action.ATTACK, then requires mc.thePlayer.getFoodStats().getFoodLevel() > 6. The handler body captures continueSprint from isSprinting(), enqueues the STOP then START pair through mc.thePlayer.sendQueue.addToSendQueue, and calls setSprinting(continueSprint) to restore the client-side flag. The food gate mirrors the vanilla hunger rule that sprinting requires more than 6 hunger, so the module never contradicts the client's own sprint eligibility.

Ordering and send path

The handler runs while the C02 is already being processed, and the pair is appended to the outgoing queue, so the server sees the STOP and START after the attack that triggered them. That ordering is the point of the technique: the reset applies to the next hit in the chain, and because the client flag is restored to continueSprint, the player keeps sprinting visually and mechanically. addToSendQueue bypasses the event bus, so the pair is not re-broadcast to other modules, and even if it were, the handler only reacts to C02 ATTACK packets, so there is no loop. The module is inert when the player is not sprinting only in the sense that the pair still goes out; the local flag restore then just re-asserts the non-sprint state.

Behavioral footprint

Each melee hit emits exactly two C0B packets, one STOP and one START, with no tick timer and no burst window, which distinguishes it from Rise's nine-pair burst. The footprint is therefore a two-packet toggle pair per C02 attack, always in the same order and always from a true sprint state when the player is sprinting, or from a false state when the player is not, because the pair is sent unconditionally past the food gate. That unconditional send is the module's tell: a STOP while the server already believes the player is not sprinting is a duplicate status packet, which server-side checks read as a protocol violation.

source Wtap.java (module)

Wtap.java65 lines · JavaOriginal ↗
1
package info.spicyclient.modules.combat;
2
3
import org.apache.commons.lang3.RandomUtils;
4
import org.lwjgl.input.Keyboard;
5
6
import info.spicyclient.chatCommands.Command;
7
import info.spicyclient.events.Event;
8
import info.spicyclient.events.listeners.EventGetBlockReach;
9
import info.spicyclient.events.listeners.EventPacket;
10
import info.spicyclient.events.listeners.EventSendPacket;
11
import info.spicyclient.events.listeners.EventUpdate;
12
import info.spicyclient.modules.Module;
13
import info.spicyclient.settings.NumberSetting;
14
import info.spicyclient.util.Timer;
15
import net.minecraft.client.Minecraft;
16
import net.minecraft.network.NetworkManager;
17
import net.minecraft.network.Packet;
18
import net.minecraft.network.play.client.C02PacketUseEntity;
19
import net.minecraft.network.play.client.C02PacketUseEntity.Action;
20
import net.minecraft.network.play.client.C03PacketPlayer;
21
import net.minecraft.network.play.client.C0BPacketEntityAction;
22
23
public class Wtap extends Module {
24
	
25
	public Wtap() {
26
		super("WTap", Keyboard.KEY_NONE, Category.COMBAT);
27
	}
28
	
29
	public void onEnable() {
30
		
31
	}
32
	
33
	public void onDisable() {
34
		
35
	}
36
	
37
	public Timer timer = new Timer();
38
	
39
	public void onEvent(Event e) {
40
		
41
		if (e instanceof EventSendPacket && e.isPre()) {
42
			Packet packet = ((EventSendPacket)e).packet;
43
			
44
			if (packet instanceof C02PacketUseEntity) {
45
				
46
				C02PacketUseEntity attack = (C02PacketUseEntity) packet;
47
				
48
				if (attack.getAction() == C02PacketUseEntity.Action.ATTACK && mc.thePlayer.getFoodStats().getFoodLevel() > 6) {
49
					
50
					boolean continueSprint = mc.thePlayer.isSprinting();
51
					
52
					//mc.thePlayer.setSprinting(false);
53
		            mc.thePlayer.sendQueue.addToSendQueue(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
54
		            mc.thePlayer.sendQueue.addToSendQueue(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.START_SPRINTING));
55
		            mc.thePlayer.setSprinting(continueSprint);
56
					
57
				}
58
				
59
			}
60
			
61
		}
62
		
63
	}
64
	
65
}

What this file does

The entire module is the EventSendPacket handler plus the NumberSetting-free constructor. The handler filters C02 ATTACK packets, applies the food gate, and enqueues the C0BPacketEntityAction STOP then START pair with the local player as the entity argument, then restores the sprint flag. The file also imports Timer and declares a timer field that is never used in the handler, a leftover from a different iteration of the module, which is worth noting because the module has no timing state at all: its cadence is driven entirely by the player's attack rate.

source EventSendPacket.java (event API)

EventSendPacket.java14 lines · JavaOriginal ↗
1
package info.spicyclient.events.listeners;
2
3
import info.spicyclient.events.Event;
4
import net.minecraft.network.Packet;
5
6
public class EventSendPacket extends Event<EventSendPacket> {
7
	
8
	public EventSendPacket(Packet packet) {
9
		this.packet = packet;
10
	}
11
	
12
	public Packet packet = null;
13
	
14
}

What this file does

EventSendPacket is the event class the handler receives; it wraps a single public Packet field and extends the Event base with pre and post phases. The module only uses the pre phase and reads the packet field to test the C02 type and action. The class also documents why the module cannot loop: the handler is only invoked for packets routed through the send event, and the pair it enqueues goes through addToSendQueue directly, so the two C0B packets never re-enter the handler even though they pass through the same queue.

anticheat Countering Checks

The anticheat code that detects or counters the techniques this module uses. Full source, with the detection mechanism explained below each box.

anticheat ActionToggleSpeed (sprint toggle rate)

ActionToggleSpeed.java80 lines · Java
1
/*
2
 * This file is part of Hawk Anticheat.
3
 * Copyright (C) 2018 Hawk Development Team
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17
 */
18
19
package me.islandscout.hawk.check.movement;
20
21
import me.islandscout.hawk.HawkPlayer;
22
import me.islandscout.hawk.check.CustomCheck;
23
import me.islandscout.hawk.event.Event;
24
import me.islandscout.hawk.event.PlayerActionEvent;
25
import org.bukkit.entity.Player;
26
27
import java.util.HashMap;
28
import java.util.Map;
29
import java.util.UUID;
30
31
/**
32
 * This check limits clients' sprint and sneak toggle rates to
33
 * prevent exploitation of the speed check and combat mechanics.
34
 */
35
public class ActionToggleSpeed extends CustomCheck {
36
37
    private Map<UUID, Long> lastSneakToggle;
38
    private Map<UUID, Long> lastSprintToggle;
39
40
    public ActionToggleSpeed() {
41
        super("actiontogglespeed", "%player% failed action toggle speed, VL: %vl%");
42
        lastSneakToggle = new HashMap<>();
43
        lastSprintToggle = new HashMap<>();
44
    }
45
46
    @Override
47
    protected void check(Event e) {
48
        if(!(e instanceof PlayerActionEvent))
49
            return;
50
        PlayerActionEvent aE = (PlayerActionEvent)e;
51
        PlayerActionEvent.PlayerAction action = aE.getAction();
52
        HawkPlayer pp = e.getHawkPlayer();
53
        UUID uuid = e.getPlayer().getUniqueId();
54
        if(action == PlayerActionEvent.PlayerAction.SNEAK_START || action == PlayerActionEvent.PlayerAction.SNEAK_STOP) {
55
56
            if(pp.getCurrentTick() - lastSneakToggle.getOrDefault(uuid, 0L) < 1) {
57
                punish(pp, canCancel(), e);
58
            } else {
59
                reward(pp);
60
            }
61
62
            lastSneakToggle.put(uuid, pp.getCurrentTick());
63
        } else if(action == PlayerActionEvent.PlayerAction.SPRINT_START || action == PlayerActionEvent.PlayerAction.SPRINT_STOP) {
64
65
            if(pp.getCurrentTick() - lastSprintToggle.getOrDefault(uuid, 0L) < 1) {
66
                punish(pp, canCancel(), e);
67
            } else {
68
                reward(pp);
69
            }
70
71
            lastSprintToggle.put(uuid, pp.getCurrentTick());
72
        }
73
    }
74
75
    public void removeData(Player p) {
76
        UUID uuid = p.getUniqueId();
77
        lastSneakToggle.remove(uuid);
78
        lastSprintToggle.remove(uuid);
79
    }
80
}

How it counteracts this module

Hawk's ActionToggleSpeed punishes sprint toggles that arrive less than one tick apart. The Spicy handler enqueues both C0B packets in a single event, so the STOP and START are processed in the same server tick: the STOP stamps the current tick into the per-player sprint toggle map, and the START that follows sees a zero-tick gap, which is below the threshold, and punishes. Every attack therefore produces the violation, and because the check is keyed on the action type rather than the packet count, neither the food gate nor the sprint state changes the outcome. The only quiet variant would be a pair split across ticks, which the module never does.

anticheat ToggleFrequency (entity action rate)

ToggleFrequency.java61 lines · Java
1
/*
2
 * This program is free software: you can redistribute it and/or modify
3
 *   it under the terms of the GNU General Public License as published by
4
 *   the Free Software Foundation, either version 3 of the License, or
5
 *   (at your option) any later version.
6
 *
7
 *   This program is distributed in the hope that it will be useful,
8
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 *   GNU General Public License for more details.
11
 *
12
 *   You should have received a copy of the GNU General Public License
13
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
14
 */
15
package fr.neatmonster.nocheatplus.checks.net;
16
17
import org.bukkit.entity.Player;
18
19
import fr.neatmonster.nocheatplus.checks.Check;
20
import fr.neatmonster.nocheatplus.checks.CheckType;
21
import fr.neatmonster.nocheatplus.players.IPlayerData;
22
import fr.neatmonster.nocheatplus.utilities.TickTask;
23
24
/**
25
 * The ToggleFrequency check is used to detect players who toggle certain actions too quickly (i.e.: sneaking).
26
 */
27
public class ToggleFrequency extends Check {
28
29
    /**
30
     * Instantiates a new toggle frequency check.
31
     */
32
    public ToggleFrequency() {
33
        super(CheckType.NET_TOGGLEFREQUENCY);
34
    }
35
36
    /**
37
     * Checks a player.
38
     * 
39
     * @param player
40
     *            the player
41
     * @param data
42
     * @param cc
43
     * @param pData
44
     * @return true, if successful
45
     */
46
    public boolean check(final Player player, final NetData data, final NetConfig cc, final IPlayerData pData) {
47
        boolean cancel = false;
48
        // (Addition to frequency is done in the listener for each toggle event)
49
        // Full time resolution
50
        final long actionFullTime = data.playerActionFreq.bucketDuration() * data.playerActionFreq.numberOfBuckets();
51
        /** Toggle action events counted */
52
        final float fullActionScore = data.playerActionFreq.score(1f) / TickTask.getLag(actionFullTime);
53
        final double violation = fullActionScore > cc.toggleActionLimit ? fullActionScore - cc.toggleActionLimit : 0.0;
54
        if (violation > 0.0) {
55
            data.toggleFrequencyVL += violation;
56
            cancel = executeActions(player, data.toggleFrequencyVL, violation, cc.toggleFrequencyActions).willCancel();
57
        }
58
        else data.toggleFrequencyVL *= 0.9;
59
        return cancel;
60
    }
61
}

How it counteracts this module

NoCheatPlus scores every C0B into NetData.playerActionFreq, a one-second ActionFrequency, and ToggleFrequency.check compares the window score against the 25 per second toggleActionLimit. Spicy emits two C0B per attack, so the check engages only at sustained high attack rates: roughly 13 attacks per second sustain 26 C0B packets per second and begin accumulating toggleFrequencyVL, while normal clicking stays far below the ceiling. The honest framing is that this check is a background constraint rather than a direct hit: it caps how fast the technique can be applied per second, but a normal 6 to 10 CPS fight never crosses it, which is why the module can operate under it for typical play.

anticheat BadPacketsF (duplicate sprint status)

BadPacketsF.java59 lines · Java
1
package ac.grim.grimac.checks.impl.badpackets;
2
3
import ac.grim.grimac.api.storage.verbose.Verbose;
4
import ac.grim.grimac.checks.Check;
5
import ac.grim.grimac.checks.CheckData;
6
import ac.grim.grimac.checks.type.PreViaPacketReceiveListener;
7
import ac.grim.grimac.player.GrimPlayer;
8
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
9
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
10
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientEntityAction;
11
12
@CheckData(name = "BadPacketsF", stableKey = "grim.badpackets.duplicate_sprint", description = "Sent duplicate sprinting status")
13
public class BadPacketsF extends Check implements PreViaPacketReceiveListener {
14
    private static final Verbose V = Verbose.of("state={bool}");
15
16
    public boolean lastSprinting;
17
    public boolean exemptNext = true; // Support 1.14+ clients starting on either true or false sprinting, we don't know
18
19
    public BadPacketsF(GrimPlayer player) {
20
        super(player);
21
    }
22
23
    @Override
24
    public void onPreViaPacketReceive(PacketReceiveEvent event) {
25
        if (event.getPacketType() == PacketType.Play.Client.ENTITY_ACTION) {
26
            WrapperPlayClientEntityAction packet = new WrapperPlayClientEntityAction(event);
27
28
            if (packet.getAction() == WrapperPlayClientEntityAction.Action.START_SPRINTING) {
29
                if (lastSprinting) {
30
                    if (exemptNext) {
31
                        exemptNext = false;
32
                        return;
33
                    }
34
                    boolean state = true;
35
                    if (flag(V.write(verbose()).bool(state)) && shouldModifyPackets()) {
36
                        event.setCancelled(true);
37
                        player.onPacketCancel();
38
                    }
39
                }
40
41
                lastSprinting = true;
42
            } else if (packet.getAction() == WrapperPlayClientEntityAction.Action.STOP_SPRINTING) {
43
                if (!lastSprinting) {
44
                    if (exemptNext) {
45
                        exemptNext = false;
46
                        return;
47
                    }
48
                    boolean state = false;
49
                    if (flag(V.write(verbose()).bool(state)) && shouldModifyPackets()) {
50
                        event.setCancelled(true);
51
                        player.onPacketCancel();
52
                    }
53
                }
54
55
                lastSprinting = false;
56
            }
57
        }
58
    }
59
}

How it counteracts this module

Grim's BadPacketsF flags a START_SPRINTING when the tracked sprint state is already true and a STOP_SPRINTING when it is already false, after a one-packet exemption. The Spicy pair is sent unconditionally once the food gate passes, so the outcome depends on the player's actual sprint state. While sprinting, the STOP is valid and the START restores a false state, so the pair alternates cleanly and passes. The failure is the non-sprint case: when the player is not sprinting, the STOP arrives while lastSprinting is already false, which is a duplicate status and flags immediately, cancelling the packet. The module's own isSprinting-independent send is exactly what feeds this check whenever the player attacks while walking.

anticheat SprintA (hunger gate)

SprintA.java35 lines · Java
1
package ac.grim.grimac.checks.impl.sprint;
2
3
import ac.grim.grimac.api.storage.verbose.Verbose;
4
import ac.grim.grimac.checks.Check;
5
import ac.grim.grimac.checks.CheckData;
6
import ac.grim.grimac.checks.type.PostPredictionListener;
7
import ac.grim.grimac.player.GrimPlayer;
8
import ac.grim.grimac.utils.anticheat.update.PredictionComplete;
9
import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
10
11
@CheckData(name = "SprintA", stableKey = "grim.sprint.hunger", description = "Sprinting with too low hunger", setback = 0)
12
public class SprintA extends Check implements PostPredictionListener {
13
    private static final Verbose V = Verbose.of("hunger={uint}");
14
15
    public SprintA(GrimPlayer player) {
16
        super(player);
17
    }
18
19
    @Override
20
    public void onPredictionComplete(PredictionComplete predictionComplete) {
21
        if (!predictionComplete.isChecked()) return;
22
23
        // Players can sprint if they're able to fly
24
        // Players can also sprint if they are on a camel, regardless of their hunger level
25
        if (player.canFly || EntityTypes.isTypeInstanceOf(player.getVehicleType(), EntityTypes.CAMEL)) return;
26
27
        if (player.food <= 6.0F) {
28
            if (player.isSprinting) {
29
                flagWithSetback(V.write(verbose()).uint(player.food));
30
            } else {
31
                reward();
32
            }
33
        }
34
    }
35
}

How it counteracts this module

SprintA flags the sprint flag being true while food is at or below 6.0. The Spicy module's food gate is set at the identical threshold, so the two rules are the same line: while the gate holds, the check rewards, and the moment hunger drops to 6 or below the module stops sending its pair, which keeps the server flag from being re-asserted and the check quiet. The gate is therefore a deliberate alignment with vanilla hunger semantics that also happens to keep SprintA from ever seeing a violation from this module. The check still matters as the constraint that defines the gate: any wtap variant that drops the food check inherits the low-hunger sprint violation immediately.

← Back to Analysis Hub