LiquidSense Dev AutoClicker module 2 files, 155 lines

LiquidSense Dev AutoClicker: Full Source Analysis

AutoClicker fakes mouse clicks through KeyBinding.onTick while a mouse button is held, one independent latch per button, driven from Render3DEvent and paced by TimeUtils.randomClickDelay.

net/ccbluex/liquidbounce/features/module/modules/combat/AutoClicker.kt · GitHub source ↗

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

Packets This Module Uses

Analysis

Overview

AutoClicker fakes mouse clicks through KeyBinding.onTick while a mouse button is held, one independent latch per button, driven from Render3DEvent and paced by TimeUtils.randomClickDelay. Each fire recomputes a fresh uniform delay over the [1000/maxCPS, 1000/minCPS] span, so the cadence is wall-clock randomized rather than fixed-period. An optional Jitter mode perturbs yaw and pitch by up to one degree in UpdateEvent to break rotation heuristics. Because the module never touches packet classes, the click output is whatever the vanilla click pipeline emits: a swing (C0A) and, on a ray-traced hit, the C02 attack.

Click latches

onRender fires at render rate, not tick rate. The left branch requires keyBindAttack.isKeyDown and leftValue, the right branch requires keyBindUseItem.isKeyDown, rightValue and a player who is not using an item; each branch then calls KeyBinding.onTick on the vanilla key binding, which sets its pressed flag for the game loop's next tick. The vanilla run-tick click handling consumes that flag: clickMouse() swings the arm and attacks the targeted entity, rightClickMouse() uses the held item, so the module needs no packet code of its own. leftLastSwing and rightLastSwing are wall-clock stamps updated per fire and the next delay is resampled immediately, so the inter-click gaps are independent uniform draws.

Delay model

TimeUtils.randomClickDelay(minCPS, maxCPS) computes (long) ((Math.random() * (1000 / minCPS - 1000 / maxCPS + 1)) + 1000 / maxCPS) with integer division. With the stock defaults 5-8 CPS that is a uniform draw over [125, 200] milliseconds, mean near 162ms, about 6.2 clicks per second rather than the nominal 6.5 midpoint, and the value change handlers clamp the bounds so minCPS can never exceed maxCPS. The span covers the whole band uniformly: every interval is as likely as any other, which is the signature consistency statistics key on.

Jitter and delivery

Jitter mode runs from UpdateEvent while a button is held and rolls Random.nextBoolean for each axis: yaw and pitch move by up to plus or minus one degree per tick, with pitch clamped to the [-90, 90] range so the random walk cannot escape the legal vertical envelope. The rotation edits land in the player's view and therefore in the next C03 look values, but clicks are unaffected. Delivery of the click itself is tick-quantized even though the latch is millisecond-precise: a delay that expires mid-tick waits for the next run-tick, so the effective inter-C0A gap is the drawn delay rounded up to the tick boundary.

source AutoClicker.kt

AutoClicker.kt89 lines · JavaOriginal ↗
1
/*
2
 * LiquidBounce Hacked Client
3
 * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
4
 * https://github.com/CCBlueX/LiquidBounce/
5
 */
6
package net.ccbluex.liquidbounce.features.module.modules.combat
7
8
import net.ccbluex.liquidbounce.event.EventTarget
9
import net.ccbluex.liquidbounce.event.Render3DEvent
10
import net.ccbluex.liquidbounce.event.UpdateEvent
11
import net.ccbluex.liquidbounce.features.module.Module
12
import net.ccbluex.liquidbounce.features.module.ModuleCategory
13
import net.ccbluex.liquidbounce.features.module.ModuleInfo
14
import net.ccbluex.liquidbounce.utils.misc.RandomUtils
15
import net.ccbluex.liquidbounce.utils.timer.TimeUtils
16
import net.ccbluex.liquidbounce.value.BoolValue
17
import net.ccbluex.liquidbounce.value.IntegerValue
18
import net.minecraft.client.settings.KeyBinding
19
import kotlin.random.Random
20
21
@ModuleInfo(name = "AutoClicker", description = "Constantly clicks when holding down a mouse button.", category = ModuleCategory.COMBAT)
22
class AutoClicker : Module() {
23
    private val maxCPSValue: IntegerValue = object : IntegerValue("MaxCPS", 8, 1, 20) {
24
25
        override fun onChanged(oldValue: Int, newValue: Int) {
26
            val minCPS = minCPSValue.get()
27
            if (minCPS > newValue)
28
                set(minCPS)
29
        }
30
31
    }
32
33
    private val minCPSValue: IntegerValue = object : IntegerValue("MinCPS", 5, 1, 20) {
34
35
        override fun onChanged(oldValue: Int, newValue: Int) {
36
            val maxCPS = maxCPSValue.get()
37
            if (maxCPS < newValue)
38
                set(maxCPS)
39
        }
40
41
    }
42
43
    private val rightValue = BoolValue("Right", true)
44
    private val leftValue = BoolValue("Left", true)
45
    private val jitterValue = BoolValue("Jitter", false)
46
47
    private var rightDelay = TimeUtils.randomClickDelay(minCPSValue.get(), maxCPSValue.get())
48
    private var rightLastSwing = 0L
49
    private var leftDelay = TimeUtils.randomClickDelay(minCPSValue.get(), maxCPSValue.get())
50
    private var leftLastSwing = 0L
51
52
    @EventTarget
53
    fun onRender(event: Render3DEvent) {
54
        // Left click
55
        if (mc.gameSettings.keyBindAttack.isKeyDown && leftValue.get() &&
56
                System.currentTimeMillis() - leftLastSwing >= leftDelay) {
57
            KeyBinding.onTick(mc.gameSettings.keyBindAttack.keyCode) // Minecraft Click Handling
58
59
            leftLastSwing = System.currentTimeMillis()
60
            leftDelay = TimeUtils.randomClickDelay(minCPSValue.get(), maxCPSValue.get())
61
        }
62
63
        // Right click
64
        if (mc.gameSettings.keyBindUseItem.isKeyDown && !mc.thePlayer.isUsingItem && rightValue.get() &&
65
                System.currentTimeMillis() - rightLastSwing >= rightDelay) {
66
            KeyBinding.onTick(mc.gameSettings.keyBindUseItem.keyCode) // Minecraft Click Handling
67
68
            rightLastSwing = System.currentTimeMillis()
69
            rightDelay = TimeUtils.randomClickDelay(minCPSValue.get(), maxCPSValue.get())
70
        }
71
    }
72
73
    @EventTarget
74
    fun onUpdate(event: UpdateEvent) {
75
        if (jitterValue.get() && (leftValue.get() && mc.gameSettings.keyBindAttack.isKeyDown || rightValue.get() && mc.gameSettings.keyBindUseItem.isKeyDown && !mc.thePlayer.isUsingItem)) {
76
            if (Random.nextBoolean()) mc.thePlayer.rotationYaw += if (Random.nextBoolean()) -RandomUtils.nextFloat(0F, 1F) else RandomUtils.nextFloat(0F, 1F)
77
78
            if (Random.nextBoolean()) {
79
                mc.thePlayer.rotationPitch += if (Random.nextBoolean()) -RandomUtils.nextFloat(0F, 1F) else RandomUtils.nextFloat(0F, 1F)
80
81
                // Make sure pitch is not going into unlegit values
82
                if (mc.thePlayer.rotationPitch > 90)
83
                    mc.thePlayer.rotationPitch = 90F
84
                else if (mc.thePlayer.rotationPitch < -90)
85
                    mc.thePlayer.rotationPitch = -90F
86
            }
87
        }
88
    }
89
}

What this file does

Both handlers are here: onRender owns the per-button latches and KeyBinding.onTick calls, onUpdate owns the Jitter rotation walk. The independent left/right lastSwing stamps and per-fire delay resampling are the whole cadence mechanism, and the absence of any packet import is itself the finding: the module rides the vanilla click pipeline.

source TimeUtils.java (randomClickDelay)

TimeUtils.java66 lines · JavaOriginal ↗
1
/*
2
 * LiquidBounce Hacked Client
3
 * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
4
 * https://github.com/CCBlueX/LiquidBounce/
5
 */
6
package net.ccbluex.liquidbounce.utils.timer;
7
8
import net.ccbluex.liquidbounce.utils.misc.RandomUtils;
9
10
public final class TimeUtils {
11
    private long lastMS;
12
13
    public static long randomDelay(final int minDelay, final int maxDelay) {
14
        return RandomUtils.nextInt(minDelay, maxDelay);
15
    }
16
17
    public static long randomClickDelay(final int minCPS, final int maxCPS) {
18
        return (long) ((Math.random() * (1000 / minCPS - 1000 / maxCPS + 1)) + 1000 / maxCPS);
19
    }
20
21
    private long getCurrentMS() {
22
        return System.nanoTime() / 1000000L;
23
    }
24
25
    public boolean hasReached(double milliseconds) {
26
        if ((double)(this.getCurrentMS() - this.lastMS) >= milliseconds) {
27
            return true;
28
        }
29
        return false;
30
    }
31
    public boolean hasReached(long milliseconds) {
32
        if ((double)(this.getCurrentMS() - this.lastMS) >= milliseconds) {
33
            return true;
34
        }
35
        return false;
36
    }
37
    public void reset() {
38
        this.lastMS = this.getCurrentMS();
39
    }
40
41
    public boolean delay(float milliSec) {
42
        if ((float)(this.getTime() - this.lastMS) >= milliSec) {
43
            return true;
44
        }
45
        return false;
46
    }
47
48
    public static long getTime() {
49
        return System.nanoTime() / 1000000L;
50
    }
51
52
    public boolean sleep(final long time) {
53
        if (this.getTime() >= time) {
54
            reset();
55
            return true;
56
        }
57
        return false;
58
    }
59
    public boolean sleep(final double time) {
60
        if (this.getTime() >= time) {
61
            reset();
62
            return true;
63
        }
64
        return false;
65
    }
66
}

What this file does

randomClickDelay is the cadence generator: a uniform draw over [1000/maxCPS, 1000/minCPS + 1) milliseconds using integer division on the CPS bounds. The uniform distribution across the whole band is what the module's anti-heuristic randomization amounts to, and it is also what makes the mean-stability statistics of consistency checks see through it.

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 FightSpeed (attack-rate cap)

FightSpeed.java90 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.combat;
20
21
import me.islandscout.hawk.HawkPlayer;
22
import me.islandscout.hawk.check.EntityInteractionCheck;
23
import me.islandscout.hawk.event.InteractAction;
24
import me.islandscout.hawk.event.InteractEntityEvent;
25
import me.islandscout.hawk.util.MathPlus;
26
import me.islandscout.hawk.util.Placeholder;
27
import org.bukkit.entity.Player;
28
29
import java.util.*;
30
31
public class FightSpeed extends EntityInteractionCheck {
32
33
    //This check is very similar to the FightSpeedConsistency check, however I will
34
    //not be merging these, because their SAMPLES variable may vary
35
    //based on configuration. For instance, FightSpeedConsistency relies on samples
36
    //of 5, yet this check relies on samples of 10.
37
38
    private final Map<UUID, Long> lastClickTime; //in client ticks
39
    private final Map<UUID, List<Long>> deltaTimes;
40
    private static final double RECORD_SENSITIVITY = 4; //don't log click if it took longer than these ticks
41
    private static int SAMPLES;
42
    private final double MAX_CPS;
43
44
    public FightSpeed() {
45
        super("fightspeed", "%player% failed attack speed. CPS: %cps%, VL: %vl%");
46
        lastClickTime = new HashMap<>();
47
        deltaTimes = new HashMap<>();
48
        SAMPLES = (int)customSetting("sampleSize", "", 10);
49
        MAX_CPS = (double)customSetting("maxCps", "", 16D);
50
    }
51
52
    @Override
53
    protected void check(InteractEntityEvent e) {
54
        if (e.getInteractAction() == InteractAction.INTERACT)
55
            return;
56
        UUID uuid = e.getPlayer().getUniqueId();
57
        HawkPlayer pp = e.getHawkPlayer();
58
        if (lastClickTime.containsKey(uuid)) {
59
            List<Long> deltaTs = deltaTimes.getOrDefault(uuid, new ArrayList<>());
60
            long deltaT = (pp.getCurrentTick() - lastClickTime.get(uuid));
61
            if (deltaT <= RECORD_SENSITIVITY) {
62
                deltaTs.add(deltaT);
63
                if (deltaTs.size() >= SAMPLES) {
64
                    double avgCps = 0;
65
                    for (double entry : deltaTs) {
66
                        avgCps += entry;
67
                    }
68
                    double divisor = (avgCps / SAMPLES / 20);
69
                    avgCps = 1 / divisor;
70
                    //if someone manages to get an Infinity, they're dumb af
71
                    if (avgCps > MAX_CPS) {
72
                        punish(pp, 1, true, e, new Placeholder("cps", (Double.isInfinite(avgCps) ? avgCps : MathPlus.round(avgCps, 2) + "")));
73
                    } else {
74
                        reward(pp);
75
                    }
76
                    deltaTs.remove(0);
77
                }
78
                deltaTimes.put(uuid, deltaTs);
79
            }
80
        }
81
        lastClickTime.put(uuid, pp.getCurrentTick());
82
    }
83
84
    @Override
85
    public void removeData(Player p) {
86
        UUID uuid = p.getUniqueId();
87
        lastClickTime.remove(uuid);
88
        deltaTimes.remove(uuid);
89
    }
90
}

How it counteracts this module

FightSpeed records non-INTERACT InteractEntityEvent deltas within a 4-tick sensitivity window, keeps a 10-sample buffer and reports CPS as 20 divided by the average tick spacing, flagging above MAX_CPS 16. At stock 5-8 CPS settings the module lands near 6.2 clicks per second, far under 16, so the check only engages when the user pushes minCPS toward the 20 cap; at a fixed 20 APS the 1-tick spacing reads exactly 20 and trips every sample.

anticheat FightSpeedConsistency (cadence regularity)

FightSpeedConsistency.java120 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.combat;
20
21
import me.islandscout.hawk.HawkPlayer;
22
import me.islandscout.hawk.check.Cancelless;
23
import me.islandscout.hawk.check.EntityInteractionCheck;
24
import me.islandscout.hawk.event.*;
25
import me.islandscout.hawk.util.MathPlus;
26
import org.bukkit.entity.Player;
27
28
import java.util.*;
29
30
public class FightSpeedConsistency extends EntityInteractionCheck implements Cancelless {
31
32
    //This check is very similar to the FightSpeed check, however I will
33
    //not be merging these, because their SAMPLES variable may vary
34
    //based on configuration. For instance, FightSpeed relies on samples
35
    //of 10, yet this check relies on samples of 5.
36
37
    private final int SAMPLES;
38
    private final int SAMPLE_SIZE;
39
    private final double STDEV_THRESHOLD;
40
    private final double MIN_CPS;
41
    private final int RECORD_THRESHOLD; //don't log click if it took longer than these ticks
42
43
    private final Map<UUID, List<Double>> pSamples;
44
    private final Map<UUID, Long> lastClickTick;
45
    private final Map<UUID, List<Long>> deltaTimes;
46
47
    public FightSpeedConsistency() {
48
        super("fightspeedconsistency", false, -1, 3, 0.99, 5000, "%player% failed click consistency. Autoclicker? VL: %vl%", null);
49
        MIN_CPS = (double)customSetting("checkAboveCPS", "", 10D);
50
        SAMPLES = (int)customSetting("samples", "", 5);
51
        SAMPLE_SIZE = (int)customSetting("sampleSize", "", 20);
52
        STDEV_THRESHOLD = (double)customSetting("stdevThreshold", "", 0.05D);
53
        RECORD_THRESHOLD = (int)(20 * (1 / MIN_CPS) + 1);
54
        pSamples = new HashMap<>();
55
        lastClickTick = new HashMap<>();
56
        deltaTimes = new HashMap<>();
57
    }
58
59
    @Override
60
    protected void check(InteractEntityEvent e) {
61
        if (e.getInteractAction() == InteractAction.INTERACT)
62
            return;
63
        UUID uuid = e.getPlayer().getUniqueId();
64
        HawkPlayer pp = e.getHawkPlayer();
65
        if (lastClickTick.containsKey(uuid)) {
66
            List<Long> deltaTs = deltaTimes.getOrDefault(uuid, new ArrayList<>());
67
            long deltaT = (pp.getCurrentTick() - lastClickTick.get(uuid));
68
69
            //log click if player clicks faster than this
70
            if (deltaT <= RECORD_THRESHOLD) {
71
                deltaTs.add(deltaT);
72
73
                //begin computing avg cps
74
                if (deltaTs.size() >= SAMPLE_SIZE) {
75
                    double avgCps = 0;
76
                    for (double entry : deltaTs) {
77
                        avgCps += entry;
78
                    }
79
                    double divisor = (avgCps / SAMPLE_SIZE / 20);
80
                    avgCps = 1 / divisor;
81
82
                    List<Double> sampless = pSamples.getOrDefault(uuid, new ArrayList<>());
83
                    sampless.add(avgCps);
84
85
                    //Debug.broadcastMessage(avgCps + "");
86
87
                    //Begin computing standard deviation and judge player.
88
                    //Only if above min cps and enough samples.
89
                    //Acts like a narrow barrier between the two limits to prevent false flags.
90
                    //Explanation: When clicks are barely meeting speed requirements, a narrow
91
                    //range of CPSs will be processed, thus setting off false flags.
92
                    if(avgCps > MIN_CPS && sampless.size() >= SAMPLES) {
93
                        //Debug.broadcastMessage(ChatColor.YELLOW + "" + MathPlus.stdev(sampless));
94
                        if(MathPlus.stdev(sampless) < STDEV_THRESHOLD) {
95
                            punish(pp, false, e);
96
                        }
97
                        else {
98
                            reward(pp);
99
                        }
100
                    }
101
102
                    if(sampless.size() >= SAMPLES) {
103
                        sampless.remove(0);
104
                    }
105
                    pSamples.put(uuid, sampless);
106
                    deltaTs.remove(0);
107
                }
108
                deltaTimes.put(uuid, deltaTs);
109
            }
110
        }
111
        lastClickTick.put(uuid, pp.getCurrentTick());
112
    }
113
114
    @Override
115
    public void removeData(Player p) {
116
        pSamples.remove(p.getUniqueId());
117
        lastClickTick.remove(p.getUniqueId());
118
        deltaTimes.remove(p.getUniqueId());
119
    }
120
}

How it counteracts this module

The check averages 20-click windows and flags when the standard deviation of five consecutive window means drops below 0.05 while the average exceeds MIN_CPS 10. The module's independent uniform draws average out over 20-click windows by the central limit theorem, so the window means are nearly constant and the check would flag once the mean cadence clears 10 CPS; the stock defaults sit under the gate, which is the honest evasion surface.

anticheat NoSwing (swing ledger)

NoSwing.java65 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 org.bukkit.entity.Player;
18
19
import fr.neatmonster.nocheatplus.checks.Check;
20
import fr.neatmonster.nocheatplus.checks.CheckType;
21
22
/**
23
 * We require that the player moves their arm between attacks, this is basically what gets checked here.
24
 */
25
public class NoSwing extends Check {
26
27
    /**
28
     * Instantiates a new no swing check.
29
     */
30
    public NoSwing() {
31
        super(CheckType.FIGHT_NOSWING);
32
    }
33
34
    /**
35
     * Checks a player.
36
     * 
37
     * @param player
38
     *            the player
39
     * @return true, if successful
40
     */
41
    public boolean check(final Player player, final FightData data, final FightConfig cc) {
42
        boolean cancel = false;
43
44
        if (data.exemptArmSwing) {
45
            data.exemptArmSwing = false;
46
        }
47
        // Did they swing his arm before?
48
        else if (++data.noSwingCount <= 1) {
49
            // Yes, reward them with reduction of their violation level.
50
            data.noSwingVL *= 0.9D;
51
        } 
52
        else {
53
            data.noSwingCount = 0;
54
            // No, increase their violation level.
55
            data.noSwingVL += 1D;
56
57
            // Execute whatever actions are associated with this check and the violation level and find out if we should
58
            // cancel the event.
59
            cancel = executeActions(player, data.noSwingVL, 1D, cc.noSwingActions).willCancel();
60
        }
61
62
        return cancel;
63
    } 
64
65
}

How it counteracts this module

FightListener increments noSwingCount per attack and decrements it per PlayerAnimationEvent, and check() only accumulates VL while the count stays above 1. Because KeyBinding.onTick runs the vanilla swing pipeline, every click emits its C0A, so the ledger stays fed and the module is invisible to this check; it only matters for no-swing autoclicker variants that attack without animating.

anticheat ClicksListener (C0A sampling feed)

ClicksListener.java65 lines · Java
1
package ai.idealistic.spartan.listeners.protocol;
2
3
import ai.idealistic.spartan.Register;
4
import ai.idealistic.spartan.abstraction.event.PlayerLeftClickEvent;
5
import ai.idealistic.spartan.abstraction.protocol.PlayerProtocol;
6
import ai.idealistic.spartan.functionality.concurrent.CheckThread;
7
import ai.idealistic.spartan.functionality.server.Config;
8
import ai.idealistic.spartan.functionality.server.PluginBase;
9
import com.comphenix.protocol.PacketType;
10
import com.comphenix.protocol.events.ListenerPriority;
11
import com.comphenix.protocol.events.PacketAdapter;
12
import com.comphenix.protocol.events.PacketEvent;
13
import org.bukkit.entity.Player;
14
15
public class ClicksListener extends PacketAdapter {
16
17
    public ClicksListener() {
18
        super(
19
                Register.plugin,
20
                ListenerPriority.NORMAL,
21
                PacketType.Play.Client.ARM_ANIMATION,
22
                PacketType.Play.Client.BLOCK_DIG
23
        );
24
    }
25
26
    @Override
27
    public void onPacketReceiving(PacketEvent event) {
28
        Player player = event.getPlayer();
29
        PlayerProtocol protocol = PluginBase.getProtocol(player);
30
31
        if (!Config.settings.getBoolean("Important.bedrock_on_protocollib")
32
                && protocol.isBedrockPlayer()) {
33
            return;
34
        }
35
        synchronized (protocol) {
36
            if (event.getPacket().getType().equals(PacketType.Play.Client.ARM_ANIMATION)) {
37
                long delay = System.currentTimeMillis() - protocol.oldClickTime;
38
39
                CheckThread.run(protocol, () -> {
40
                    if (delay > 150) {
41
                        protocol.clickBlocker = false;
42
                    }
43
                    if (!protocol.clickBlocker) {
44
                        protocol.executeRunners(
45
                                false,
46
                                new PlayerLeftClickEvent(
47
                                        player,
48
                                        delay
49
                                )
50
                        );
51
                    }
52
                    protocol.oldClickTime = System.currentTimeMillis();
53
                });
54
            } else if (event.getPacket().getType().equals(PacketType.Play.Client.BLOCK_DIG)) {
55
                String s = event.getPacket().getStructures().getValues().toString();
56
57
                CheckThread.run(protocol, () -> {
58
                    protocol.oldClickTime = System.currentTimeMillis();
59
                    protocol.clickBlocker = !s.contains("ABORT");
60
                });
61
            }
62
        }
63
    }
64
65
}

How it counteracts this module

The listener is Spartan's C0A feed for FastClicks: per arm animation it computes the delay since the last click, clears clickBlocker above 150ms and otherwise routes a PlayerLeftClickEvent into executeRunners. The module's 125-200ms draws straddle that 150ms reset line, so the feed engages intermittently; the FastClicks verdict thresholds live in an executor class absent from the clone, so the listener is citable as the sampling layer, not the verdict.

← Back to Analysis Hub