Tenacity 6.0 Criticals module 2 files, 82 lines

Tenacity 6.0 Criticals: Full Source Analysis

Tenacity 6.0's Criticals makes melee attacks land as crits by queueing C03 position-lift packets that claim a small upward offset with onGround false before the attack, so the server-side entity carries fall distance when the C02 arrives.

dev/tenacity/module/impl/combat/Criticals.java · GitHub source ↗

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

Packets This Module Uses

Analysis

Overview

Tenacity 6.0's Criticals makes melee attacks land as crits by queueing C03 position-lift packets that claim a small upward offset with onGround false before the attack, so the server-side entity carries fall distance when the C02 arrives. The Watchdog mode (default) fires on every grounded MotionEvent and queues two lifts, 0.06 plus random jitter and 0.01 plus random jitter; the Packet mode gates three sub-pixel lifts, 0.006253453, 0.002253453 and 0.001253453, behind an on-ground target check and a hurt-resistance threshold. The Dev mode is present only as commented-out source that would add a fourth lift and a C18PacketSpectate with a random UUID. The module never sends the attack itself; it services the player's normal C02 clicks by pre-arming the fall distance.

Watchdog mode cadence

Watchdog runs from the MotionEvent listener with no attack gating at all: whenever e.isOnGround() is true it queues two C04PacketPlayerPosition packets at the current position plus 0.06 plus a random value below 0.001, and the same plus 0.01 plus jitter, both with onGround false. Because the event fires every tick while the player is grounded, the mode produces a continuous two-lift-per-tick stream that keeps the server-side fall distance nonzero at all times. The 0.06 lift is above the 1.8 minimum-move threshold of 0.03, so the server actually moves the entity up, while the 0.01 lift sits below it and only applies the onGround flag.

Packet mode gating

Packet mode adds three conditions before lifting: the object mouse-over must target an entity, the local player must be onGround, and the target's hurtResistantTime must exceed the Delay setting (default 1, range 0-20). When those hold it queues three C04 lifts at 0.006253453, 0.002253453 and 0.001253453, all below the 0.03 min-move, so the server ignores the coordinate deltas but applies the onGround false flag to each. The mode therefore produces the flag-only ground spoof signature rather than a visible position change, and the Delay setting doubles as the hurt-time threshold that spaces lift bursts around the hittable window.

Dead code and unused state

The Dev branch is fully commented out: it would queue four offsets up to 0.06253453 and then a C18PacketSpectate carrying a random UUID, a spectate packet that has no business in a criticals module and is the kind of leftover that points at a paste lineage. The TimerUtil field timer is declared but never referenced anywhere in the file, and PacketUtils is imported yet only the dead Dev branch would call sendPacketNoEvent; the live modes queue through mc.thePlayer.sendQueue.addToSendQueue directly. These are honest dead-code findings: the shipped module is Watchdog plus Packet, nothing more.

source Criticals.java (module)

Criticals.java61 lines · JavaOriginal ↗
1
package dev.tenacity.module.impl.combat;
2
3
4
import dev.tenacity.module.ModuleCategory;
5
import dev.tenacity.module.Module;
6
import dev.tenacity.event.IEventListener;
7
import dev.tenacity.event.impl.player.MotionEvent;
8
import dev.tenacity.setting.impl.ModeSetting;
9
import dev.tenacity.setting.impl.NumberSetting;
10
import dev.tenacity.util.network.PacketUtils;
11
import dev.tenacity.util.misc.TimerUtil;
12
import net.minecraft.network.play.client.C03PacketPlayer;
13
import net.minecraft.network.play.client.C18PacketSpectate;
14
15
import java.util.UUID;
16
17
@SuppressWarnings("unused")
18
public final class Criticals extends Module {
19
20
    private final ModeSetting modeSetting = new ModeSetting("Mode", "Watchdog", "Packet", "Dev");
21
    private final NumberSetting delay = new NumberSetting("Delay", 1,0, 20, 1);
22
    private final TimerUtil timer = new TimerUtil();
23
24
    public Criticals() {
25
        super("Criticals", "Crit attacks", ModuleCategory.COMBAT);
26
        initializeSettings(modeSetting, delay);
27
    }
28
29
    private final IEventListener<MotionEvent> onMotion = e -> {
30
        switch (modeSetting.getCurrentMode()) {
31
            case "Watchdog":
32
                if (e.isOnGround()) {
33
                    for (double offset : new double[]{0.06f, 0.01f}) {
34
                        mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + offset + (Math.random() * 0.001), mc.thePlayer.posZ, false));
35
                    }
36
                }
37
                break;
38
39
            case "Packet":
40
                if (mc.objectMouseOver.entityHit != null && mc.thePlayer.onGround) {
41
                    if (mc.objectMouseOver.entityHit.hurtResistantTime > (int) delay.getCurrentValue()) {
42
                        for (double offset : new double[]{0.006253453, 0.002253453, 0.001253453}) {
43
                            mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + offset, mc.thePlayer.posZ, false));
44
                        }
45
                    }
46
                }
47
                break;
48
//            case "Dev":
49
//                if (mc.objectMouseOver.entityHit != null && mc.thePlayer.onGround) {
50
//                    if (mc.objectMouseOver.entityHit.hurtResistantTime > (int) delay.getCurrentValue()) {
51
//                        for (double offset : new double[]{0.06253453, 0.02253453, 0.001253453, 0.0001135346}) {
52
//                            mc.thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + offset, mc.thePlayer.posZ, false));
53
//                            PacketUtils.sendPacketNoEvent(new C18PacketSpectate(UUID.randomUUID()));
54
//                        }
55
//                    }
56
//                }
57
//                break;
58
        }
59
    };
60
61
}

What this file does

All behavior sits in the onMotion listener switched on the ModeSetting. Watchdog queues two C04 lifts on every grounded tick; Packet gates three sub-pixel lifts on target presence, onGround and hurtResistantTime versus the Delay NumberSetting. The commented Dev branch and the unused TimerUtil field are the dead-code findings documented in the sections. The file also shows the send path, mc.thePlayer.sendQueue.addToSendQueue for every live lift, which is what makes the wire signature a strict C03 stream with no silent bypass.

source PacketUtils.java (unused silent-send helper)

PacketUtils.java21 lines · JavaOriginal ↗
1
package dev.tenacity.util.network;
2
3
import dev.tenacity.util.Utils;
4
import net.minecraft.network.Packet;
5
6
public class PacketUtils implements Utils {
7
8
    public static void sendPacket(Packet<?> packet, boolean silent) {
9
        if (mc.thePlayer != null) {
10
        }
11
    }
12
13
    public static void sendPacketNoEvent(Packet packet) {
14
        sendPacket(packet, true);
15
    }
16
17
    public static void sendPacket(Packet packet) {
18
        sendPacket(packet, false);
19
    }
20
21
}

What this file does

PacketUtils wraps sendPacket with a silent flag that skips the event bus, and sendPacketNoEvent is the silent variant the commented-out Dev branch would call for its spectate packet. The live Watchdog and Packet modes never touch this class: they queue lifts through the player's sendQueue so every C04 passes through the normal outbound path where other modules and packet listeners can observe it. Including the file documents the contrast, the dead branch's helper versus the live modes' visible queue, which matters because the countering checks key on the lift stream being event-visible.

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 Critical (fall distance divergence and jump phase)

Critical.java133 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.fight;
16
17
import java.util.ArrayList;
18
import java.util.List;
19
20
import org.bukkit.Location;
21
import org.bukkit.entity.Player;
22
import org.bukkit.potion.PotionEffectType;
23
24
import fr.neatmonster.nocheatplus.NCPAPIProvider;
25
import fr.neatmonster.nocheatplus.actions.ParameterName;
26
import fr.neatmonster.nocheatplus.checks.Check;
27
import fr.neatmonster.nocheatplus.checks.CheckType;
28
import fr.neatmonster.nocheatplus.checks.ViolationData;
29
import fr.neatmonster.nocheatplus.checks.moving.MovingConfig;
30
import fr.neatmonster.nocheatplus.checks.moving.MovingData;
31
import fr.neatmonster.nocheatplus.checks.moving.model.PlayerMoveData;
32
import fr.neatmonster.nocheatplus.checks.moving.model.PlayerMoveInfo;
33
import fr.neatmonster.nocheatplus.checks.moving.velocity.VelocityFlags;
34
import fr.neatmonster.nocheatplus.compat.Bridge1_13;
35
import fr.neatmonster.nocheatplus.penalties.IPenaltyList;
36
import fr.neatmonster.nocheatplus.players.IPlayerData;
37
import fr.neatmonster.nocheatplus.utilities.StringUtil;
38
import fr.neatmonster.nocheatplus.utilities.map.BlockFlags;
39
import fr.neatmonster.nocheatplus.utilities.moving.AuxMoving;
40
import fr.neatmonster.nocheatplus.utilities.moving.MovingUtil;
41
42
/**
43
 * A check used to verify that critical hits done by players are legit.
44
 */
45
public class Critical extends Check {
46
    
47
    private final AuxMoving auxMoving = NCPAPIProvider.getNoCheatPlusAPI().getGenericInstance(AuxMoving.class);
48
    
49
    /**
50
     * Instantiates a new critical check.
51
     */
52
    public Critical() {
53
        super(CheckType.FIGHT_CRITICAL);
54
    }
55
    
56
    /**
57
     * Checks a player.
58
     * 
59
     * @param player
60
     * @param loc
61
     * @param data
62
     * @param cc
63
     * @param pData
64
     * @param penaltyList
65
     * @return true, if successful
66
     */
67
    public boolean check(final Player player, final Location loc, final FightData data, final FightConfig cc, 
68
                         final IPlayerData pData, final IPenaltyList penaltyList) {
69
        boolean cancel = false;
70
        final List<String> tags = new ArrayList<String>();
71
        final MovingData mData = pData.getGenericInstance(MovingData.class);
72
        final MovingConfig mCC = pData.getGenericInstance(MovingConfig.class);
73
        final PlayerMoveData thisMove = mData.playerMoves.getCurrentMove();
74
        final PlayerMoveData lastMove = mData.playerMoves.getFirstPastMove();
75
        final double mcFallDistance = (double) player.getFallDistance();
76
        final double ncpFallDistance = mData.noFallFallDistance;
77
        final double realisticFallDistance = MovingUtil.getRealisticFallDistance(player, thisMove.from.getY(), thisMove.to.getY(), mData, pData);
78
        final PlayerMoveInfo moveInfo = auxMoving.usePlayerMoveInfo();
79
        moveInfo.set(player, loc, null, mCC.yOnGround);
80
        
81
        // Check if the hit was a critical hit (fall distance is present, player is not on a ladder, not in vehicle, and without blindness effect).
82
        if (mcFallDistance > 0.0 && !player.isInsideVehicle() && !player.hasPotionEffect(PotionEffectType.BLINDNESS)) {
83
84
            if (pData.isDebugActive(type)) {
85
                debug(player, 
86
                    "Fall distances: MC(" + StringUtil.fdec3.format(mcFallDistance) +") | NCP("+ StringUtil.fdec3.format(ncpFallDistance) +") | R("+ StringUtil.fdec3.format(realisticFallDistance) +")"
87
                    + "\nfD diff: " + StringUtil.fdec3.format(Math.abs(ncpFallDistance - mcFallDistance))
88
                    + "\nJumpPhase: " + mData.sfJumpPhase + " | NCP onGround: " + (thisMove.from.onGround ? "ground -> " : "--- -> ") + (thisMove.to.onGround ? "ground" : "---") + " | MC onGround: " + player.isOnGround()
89
                ); // + ", packet onGround: " + packet.onGround); 
90
            }
91
            
92
            // Check for skipping conditions first.
93
            moveInfo.from.collectBlockFlags(0.4);
94
            // False positives with medium counts reset all nofall data when nearby boat
95
            // TODO: Fix isOnGroundDueToStandingOnAnEntity() to work on entity not nearby
96
            if (moveInfo.from.isOnGroundDueToStandingOnAnEntity()
97
                // Edge case with slime blocks
98
                || (moveInfo.from.getBlockFlags() & BlockFlags.F_BOUNCE25) != 0 && !moveInfo.from.isOnGround() && !moveInfo.to.isOnGround()) {
99
                auxMoving.returnPlayerMoveInfo(moveInfo);
100
                return false;
101
            }
102
            
103
            boolean isIllegal =
104
                       // 0: Don't allow players to perform critical hits in blocks where the game would reset fall distance (water, powder snow, bushes, webs, climbables)
105
                       moveInfo.from.isResetCond()
106
                       // 0: Same as above. The game resets fall distance with slowfall
107
                       || !Double.isInfinite(Bridge1_13.getSlowfallingAmplifier(player))
108
                       // 0: A full jump from ground requires more than 6 phases/events.
109
                       || mData.sfJumpPhase > 0 && mData.sfJumpPhase <= mData.liftOffEnvelope.getMaxJumpPhase(mData.jumpAmplifier) 
110
                       && !moveInfo.from.seekCollisionAbove(0.2) 
111
                       && (lastMove.verVelUsed.isEmpty() || !lastMove.verVelUsed.get(0).hasFlag(VelocityFlags.ORIGIN_BLOCK_BOUNCE))
112
                       // 0: Always invalidate critical hits if we judge the player to be on ground (given enough fall distance)
113
                       || Math.abs(ncpFallDistance - mcFallDistance) > 1e-5 && (moveInfo.from.isOnGround() || lastMove.touchedGroundWorkaround)
114
                       // (Let SurvivalFly catch low-jumps).
115
            ;
116
117
            // Handle violations
118
            if (isIllegal) {
119
                data.criticalVL += 1.0;
120
                // Execute whatever actions are associated with this check and 
121
                //  the violation level and find out if we should cancel the event.
122
                final ViolationData vd = new ViolationData(this, player, data.criticalVL, 1.0, cc.criticalActions);
123
                if (vd.needsParameters()) vd.setParameter(ParameterName.TAGS, StringUtil.join(tags, "+"));
124
                cancel = executeActions(vd).willCancel();
125
                // TODO: Introduce penalty instead of cancel.
126
            }
127
            // Crit was legit, reward the player.
128
            else data.criticalVL *= 0.96D;
129
        }
130
        auxMoving.returnPlayerMoveInfo(moveInfo);
131
        return cancel;
132
    }
133
}

How it counteracts this module

NCP's fight.Critical runs whenever the server sees a crit delivered, and its rule 3 is the direct hit on packet lifts: it compares NCP's own fall-distance accounting, derived from real physics, against the fall distance the client's movement claims, and flags when the divergence exceeds 1e-5 while the move's origin is on ground or the touched-ground workaround applies. The Tenacity lifts claim onGround false from a standing position, so the server-side fall distance is fake by construction and the divergence check fires on the first crit after a lift burst. The jump-phase rule 2 also engages for the 0.06 Watchdog lift: a crit delivered while sfJumpPhase sits in 1..maxJumpPhase with no real jump motion is too early in a jump, and NCP's own comment notes SurvivalFly catches the low-jump shape.

The sub-pixel Packet-mode offsets are the honest gap: NCP's envelope machinery never sees them because they fall under the 0.03 min-move, so the coordinate delta is zero to the checker and only the flag is applied. Those modes are fought by the combat-side checks that read the attack itself rather than the movement, which is why the Arc and Hawk entries below matter for the Packet mode specifically.

anticheat Criticals (attack while physics says onGround)

Criticals.java27 lines · Java
1
package me.vrekt.arc.check.combat;
2
3
import me.vrekt.arc.check.Check;
4
import me.vrekt.arc.check.CheckType;
5
import me.vrekt.arc.data.moving.MovingData;
6
import org.bukkit.entity.Player;
7
8
public class Criticals extends Check {
9
10
    public Criticals() {
11
        super(CheckType.CRITICALS);
12
    }
13
14
    public boolean check(Player player) {
15
16
        MovingData data = MovingData.getData(player);
17
        boolean onGround = data.isOnGround();
18
        if (onGround) {
19
            double vertical = data.getVerticalSpeed();
20
            // thats already impossible, lets check how high they 'jumped'.
21
            if (vertical < 0.37) {
22
                return checkViolation(player, "critical while onGround");
23
            }
24
        }
25
        return false;
26
    }
27
}

How it counteracts this module

Arc v2's combat.Criticals is the simplest counter and the one that bites every Tenacity mode. On each attack it checks Arc's own physics-derived ground state, computed by its MovingListener from the world, not from the packet flag, and flags a critical while onGround whenever that state is grounded and the vertical speed is below 0.37. The Tenacity lifts never move the player more than 0.06 blocks and the sub-pixel Packet offsets move nothing at all, so Arc's ground state stays onGround through the whole burst and every C02 attack that follows a lift is a critical while onGround.

There is no configuration of the module that satisfies this check: only a real 0.42 jump clears the vertical-speed branch, and the module never produces one. The check is also agnostic to the packet split, because it keys on the attack event and the derived ground truth rather than on the C03 stream, which makes it the strongest single counter in this set.

anticheat SmallHop (mini-lift hop)

SmallHop.java60 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.position;
20
21
import me.islandscout.hawk.HawkPlayer;
22
import me.islandscout.hawk.check.MovementCheck;
23
import me.islandscout.hawk.event.MoveEvent;
24
import me.islandscout.hawk.util.AdjacentBlocks;
25
import org.bukkit.Location;
26
import org.bukkit.Material;
27
28
/**
29
 * This check is used to flag clients whose jumps are too
30
 * small. Although insignificant at first glance, small jumps
31
 * can be exploited to bypass other checks such as speed and
32
 * criticals.
33
 */
34
public class SmallHop extends MovementCheck {
35
36
    //TODO: False flag in cobwebs
37
38
    public SmallHop() {
39
        super("smallhop", true, 0, 5, 0.99, 5000, "%player% failed small-hop, VL: %vl%", null);
40
    }
41
42
    @Override
43
    protected void check(MoveEvent e) {
44
        HawkPlayer pp = e.getHawkPlayer();
45
        double deltaY = e.isTeleportAccept() ? 0D : e.getTo().getY() - e.getFrom().getY();
46
        double prevDeltaY = pp.getVelocity().getY();
47
        boolean wasOnGround = pp.isOnGround();
48
        Location checkPos = e.getFrom().clone().add(0, 1, 0);
49
50
        if(!e.getPlayer().isFlying() && !e.hasAcceptedKnockback() && !e.isSlimeBlockBounce() && wasOnGround && deltaY > 0 && deltaY < 0.4 && prevDeltaY <= 0 &&
51
                !AdjacentBlocks.blockAdjacentIsSolid(checkPos) && !AdjacentBlocks.blockAdjacentIsSolid(checkPos.add(0, 1, 0)) && !AdjacentBlocks.blockAdjacentIsLiquid(checkPos.add(0, -1, 0)) &&
52
                !AdjacentBlocks.blockAdjacentIsLiquid(checkPos.add(0, -1, 0)) && !AdjacentBlocks.matIsAdjacent(e.getTo(), Material.LADDER, Material.VINE) &&
53
                !AdjacentBlocks.onGroundReally(e.getTo(), -1, false, 0.001, pp)) {
54
            punishAndTryRubberband(pp, e);
55
        }
56
        else {
57
            reward(pp);
58
        }
59
    }
60
}

How it counteracts this module

Hawk's SmallHop exists specifically to catch the mini-hops used to spoof criticals: its docstring says small jumps can be exploited to bypass speed and criticals checks. It flags when the player was onGround, the vertical delta is between 0 and 0.4, the previous delta was non-positive, and no ladder, vine, slime bounce or adjacent solid explains the rise, then punishes and rubberbands. The Watchdog mode's 0.06 lift is squarely inside the 0-0.4 band, so every grounded lift ticks the check and the punishment lands on the first one.

The Packet mode's offsets are the honest boundary: 0.006253453 and 0.002253453 sit inside the band and still flag, while 0.001253453 approaches the 0.001 ground tolerance that the check applies to its onGroundReally test. The sub-0.001 family of criticals offsets is the known pass surface here, which is exactly why the module's smallest lifts are the ones most likely to survive Hawk.

anticheat NoFall (faked ground claims)

NoFall.java100 lines · Java
1
package ac.grim.grimac.checks.impl.groundspoof;
2
3
import ac.grim.grimac.checks.Check;
4
import ac.grim.grimac.checks.CheckData;
5
import ac.grim.grimac.checks.type.PacketReceiveListener;
6
import ac.grim.grimac.player.GrimPlayer;
7
import ac.grim.grimac.predictionengine.GhostBlockDetector;
8
import ac.grim.grimac.utils.collisions.datatypes.SimpleCollisionBox;
9
import ac.grim.grimac.utils.nmsutil.Collisions;
10
import ac.grim.grimac.utils.nmsutil.GetBoundingBox;
11
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
12
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
13
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientPlayerFlying;
14
15
import java.util.ArrayList;
16
import java.util.List;
17
18
// Catches NoFalls for LOOK and GROUND packets
19
// This check runs AFTER the predictions
20
@CheckData(name = "NoFall", stableKey = "grim.groundspoof.no_fall", description = "Sent an on-ground packet while not colliding with the ground", setback = 10)
21
public class NoFall extends Check implements PacketReceiveListener {
22
23
    public boolean flipPlayerGroundStatus = false;
24
25
    public NoFall(GrimPlayer player) {
26
        super(player);
27
    }
28
29
    @Override
30
    public void onPacketReceive(PacketReceiveEvent event) {
31
        if (event.getPacketType() == PacketType.Play.Client.PLAYER_FLYING || event.getPacketType() == PacketType.Play.Client.PLAYER_ROTATION) {
32
            // The player hasn't spawned yet
33
            if (player.getSetbackTeleportUtil().insideUnloadedChunk()) return;
34
            // The player has already been flagged, and
35
            if (player.getSetbackTeleportUtil().blockOffsets) return;
36
37
            WrapperPlayClientPlayerFlying wrapper = new WrapperPlayClientPlayerFlying(event);
38
39
            // If the player claims to be on the ground
40
            // Run this code IFF the player doesn't send the position, as that won't get processed by predictions
41
            if (wrapper.isOnGround() && !wrapper.hasPositionChanged()) {
42
                if (!isNearGround(wrapper.isOnGround())) { // If player isn't near ground
43
                    // 1.8 boats have a mind on their own... only flag if they're not near a boat or are on 1.9+
44
                    if (!GhostBlockDetector.isGhostBlock(player)) flagWithSetback();
45
                    if (shouldModifyPackets()) {
46
                        wrapper.setOnGround(false);
47
                        event.markForReEncode(true);
48
                    }
49
                }
50
            }
51
        }
52
53
        if (WrapperPlayClientPlayerFlying.isFlying(event.getPacketType())) {
54
            WrapperPlayClientPlayerFlying wrapper = new WrapperPlayClientPlayerFlying(event);
55
            // The prediction based NoFall check (that runs before us without the packet)
56
            // has asked us to flip the player's onGround status
57
            // This happens to make both checks use the same logic... and
58
            // since we don't have access to modify the packet with prediction based checks
59
            // I could add that feature but ehh... this works and is better anyway.
60
            //
61
            // Also flip teleports because I don't trust vanilla's handling of teleports and ground
62
            if (flipPlayerGroundStatus) {
63
                flipPlayerGroundStatus = false;
64
                if (shouldModifyPackets()) {
65
                    wrapper.setOnGround(!wrapper.isOnGround());
66
                    event.markForReEncode(true);
67
                }
68
            }
69
            if (player.packetStateData.lastPacketWasTeleport) {
70
                if (shouldModifyPackets()) {
71
                    wrapper.setOnGround(false);
72
                    event.markForReEncode(true);
73
                }
74
            }
75
        }
76
    }
77
78
    private boolean isNearGround(boolean onGround) {
79
        if (onGround) {
80
            SimpleCollisionBox feetBB = GetBoundingBox.getBoundingBoxFromPosAndSize(player, player.x, player.y, player.z, 0.6f, 0.001f);
81
            feetBB.expand(player.getMovementThreshold()); // Movement threshold can be in any direction
82
83
            return checkForBoxes(feetBB);
84
        }
85
        return true;
86
    }
87
88
    private boolean checkForBoxes(SimpleCollisionBox playerBB) {
89
        List<SimpleCollisionBox> boxes = new ArrayList<>();
90
        Collisions.getCollisionBoxes(player, playerBB, boxes, false);
91
92
        for (SimpleCollisionBox box : boxes) {
93
            if (playerBB.collidesVertically(box)) { // If we collide vertically but aren't in the block
94
                return true;
95
            }
96
        }
97
98
        return player.compensatedWorld.isNearHardEntity(playerBB.copy().expand(4));
99
    }
100
}

How it counteracts this module

Grim's groundspoof.NoFall validates the onGround flag against collision: on a PLAYER_FLYING or ROTATION packet claiming onGround true without a position change, it expands the feet box by the movement threshold, and with no vertical collision it flags, sets back ten blocks and rewrites the claim to false. That is the mirror of what Tenacity does: the module claims onGround false while standing, so the flag-only sub-pixel lifts produce a stream of false ground claims that Grim's post-prediction ground check sees as a player who never lands.

The honest reading is that NoFall's true-claim direction is aimed at the Sigma-style Minis family that spoofs onGround true to avoid fall damage, while Tenacity's false-claim direction surfaces in Grim's prediction pipeline as a consistency problem rather than this specific check. The lift pattern is still visible to the prediction engine through the flag stream, and the position-bearing 0.06 Watchdog lift is subject to the full movement prediction on the next position update.

← Back to Analysis Hub