Tenacity 6.0's AutoClicker is a two-mode ghost module that drives the vanilla click path once per delay interval while the attack key is held. The Normal mode computes a delay from the Min and Max CPS settings and calls mc.clickMouse(), which sends the C0A arm-swing packet alongside the C02 attack in one press, after resetting mc.leftClickCounter to 0 so every click is treated as a fresh press. The Drag mode runs a 1200ms click burst followed by a 300ms pause while the key is held. The delay math is the notable detail: the settings are labelled 9 to 11 CPS, but the formula (20 minus cps) times 20 produces a uniform random delay between 180 and 220 milliseconds, so the module actually clicks at 4.5 to 5.5 CPS, roughly half the labelled rate, and that low rate is what keeps it under the statistical gates of the autoclicker checks below.
Architecture
The module is a ModeSetting plus four settings and three TimerUtil fields. The MotionEvent consumer runs on the pre-motion pass only, so the click decision happens once per client tick before the movement packet is built. The Normal branch checks that the attack key is held, then fires when the click timer passes the random delay; the Drag branch gates the same click timer inside a 1200ms drag window that resets after a 300ms delay. Every click path sets mc.leftClickCounter to 0 before calling mc.clickMouse(), which resets the vanilla click-rate limiter so the synthetic presses are treated as fresh mouse-downs.
The delay math
The delay is computed once per tick: maxValue is (20 minus maxCPS) times 20 and minValue is (20 minus minCPS) times 20, and MathUtil.nextInt(minValue, maxValue) picks a uniform integer between them. With the defaults of 9 and 11 that is a delay between 180 and 220 milliseconds, which is 4.5 to 5.5 clicks per second, not the 9 to 11 the labels promise, and the formula is inverted: the Min CPS setting produces the longer delay. The second click check at cps minus 2 milliseconds is effectively dead code, because its 2ms window between the two thresholds is never sampled at the client's roughly 50ms tick granularity, so each cycle emits exactly one click.
Click path and drag cycle
mc.clickMouse() runs the full vanilla click: against an entity it calls attackEntity (C02 use-entity with the attack action plus the swing), against a block it starts a dig, and against air it swings the arm, and every path sends C0APacketAnimation, which is the wire surface the server-side autoclicker checks read. The Drag mode clicks at the same delay inside a 1200ms window, then idles for 300ms before the next burst, so the C0A stream becomes periodic bursts of about six clicks followed by silence, a cadence a periodicity detector can lock onto if the click rate crosses the detector's gates.
private final IEventListener<UpdateEvent> onUpdateEvent = event -> setSuffix(mode.getCurrentMode());
99
}
What this file does
The module holds the entire click decision. The MotionEvent consumer computes the random delay, checks the attack key, resets mc.leftClickCounter, and calls mc.clickMouse() through the vanilla click path, which emits the C0A swing alongside the C02 attack. The Drag branch wraps the same click in the burst-and-pause cycle driven by three timers. The setting guards (min clamped to max and back) run every tick and keep the delay range sane.
The second click check at cps minus 2ms is the honest dead-code detail: after the first check resets the click timer, the second check can only fire inside a 2ms window that a 50ms tick loop never samples, so it never produces a click in practice.
MathUtil.nextInt is the random source behind the click timing. It casts Math.random() times (max minus min) plus min to an int, so the delay is uniformly distributed on the interval from minValue to maxValue with max exclusive, which is what gives the click train its constant 180 to 220ms inter-click interval. The uniform spread is the statistical tell: a human click train has a skewed, high-variance interval distribution, while this one has a hard 40ms spread with no long-tail outliers.
The same utility serves the rest of the Tenacity module set with its random helpers, gaussian sampler and interpolation methods, so the file is shared infrastructure rather than click-specific code; the nextInt method is the only part the AutoClicker uses.
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 ClickACF (click autocorrelation)
ClickACF.java89 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.interaction;
20
21
import me.islandscout.hawk.check.Cancelless;
22
import me.islandscout.hawk.check.CustomCheck;
23
import me.islandscout.hawk.event.ArmSwingEvent;
24
import me.islandscout.hawk.event.Event;
25
import me.islandscout.hawk.event.MoveEvent;
26
27
import java.util.ArrayList;
28
import java.util.Arrays;
29
import java.util.List;
30
31
public class ClickACF extends CustomCheck implements Cancelless {
32
33
private static final double ACF_THRESHOLD = 0.87;
34
private static final int ACF_PERIOD_THRESHOLD = 9;
35
private static final double MIN_ACF_0_NORM = 13; //Normalized acf(0)
Hawk's ClickACF runs an autocorrelation over the per-tick click count. Every MoveEvent appends the current tick's click count to a 30-sample window, and every arm swing increments the count for the current tick. When the window fills, the check computes the autocorrelation at lags 1 to 30 and flags when a lag between 1 and the ACF_PERIOD_THRESHOLD of 9 exceeds 0.87 times the zero-lag value, which is the signature of a periodic click train. Before the periodicity scan it enforces a minimum click rate: the normalized zero-lag value must reach MIN_ACF_0_NORM of 13, which requires roughly 13 sustained clicks per second.
The module's real rate of 4.5 to 5.5 CPS sits far below that gate, so the check prints the "CPS not high enough" bail and never evaluates the periodicity of the train. The honest tolerance is the low rate itself: a human-range click speed with a small uniform jitter is exactly the profile this check is tuned not to evaluate. If the user raised the settings to 13 CPS or higher, the uniform 180 to 220ms cadence would produce a strong autocorrelation peak at a period of 4 to 5 ticks and the check would flag.
ClickStats is a histogram of inter-click intervals measured in ticks. Each arm swing computes the gap since the previous swing, and gaps up to MAX_PERIOD of 4 ticks are tallied into per-gap buckets until SAMPLES of 80 accumulate, then the histogram resets. The module's 200ms inter-click gap is exactly 4 ticks at 20 TPS, so every interval lands in the same bucket, which is the degenerate single-column histogram the check was written to expose. The cloned file is honest about its own state: the histogram print and the punish call are commented out, so in this build the check only collects and never acts.
The takeaway is that the module's interval distribution is detectably non-human (a constant 4-tick gap with at most one tick of jitter), but the shipped copy of the check has no active flag path, so on a server running this build the histogram is observational only.
// If the movement are not incredibly low and the player isn't digging
32
if (valid) samples.add(movements);
33
34
if (samples.size() == 20) {
35
// Get the outliers properly from the math utility
36
final Pair<List<Double>, List<Double>> outlierPair = MathUtil.getOutliers(samples);
37
38
// Get the deviation from the math utility and the outliers
39
final double deviation = MathUtil.getStandardDeviation(samples);
40
final double outliers = outlierPair.getX().size() + outlierPair.getY().size();
41
42
// Low deviation and low outliers
43
if (deviation < 2.d && outliers < 2) fail();
44
45
// Clear the list
46
samples.clear();
47
}
48
49
// Reset the movements
50
movements = 0;
51
} else if (object instanceof WrappedPlayInFlying) {
52
++movements;
53
}
54
}
55
}
How it counteracts this module
Frequency's AutoClickerA measures movements between swings. Each C0A (WrappedPlayInArmAnimation) samples the number of C03 movements since the previous swing, but only when the gate passes: measured CPS above 6.5, fewer than 4 movements since the last swing, and the player not digging or placing. When 20 samples accumulate, the check computes the standard deviation and the outlier count, and a deviation below 2 with fewer than 2 outliers fails.
The gate is the module's escape hatch: at 4.5 to 5.5 real CPS, the measured click rate stays under the 6.5 CPS requirement, so no samples are ever added and the check never accumulates a window. The bypass surface is narrow: push the settings toward 13 to 14 CPS and the gate opens, and then the uniform 180 to 220ms delay produces a deviation of a few milliseconds and zero outliers, which fails the deviation and outlier test on the first full window.
public void onPacketReceiving(Class<? extends Packet> type, Packet packet) {
22
if (player.isDigging()) {
23
threshold /= 4;
24
return;
25
}
26
27
if (packet instanceof PacketPlayInFlying) {
28
if (player.getSwingDelay() <= 100L) { //no cps drops, proably cheating
29
if (++threshold > 100) { //TODO: find appropriate threshold
30
onViolation("AutoClicker Type A", 60000L, 0);
31
32
threshold = 0;
33
}
34
35
} else {
36
threshold /= 4;
37
}
38
}
39
}
40
}
How it counteracts this module
Azure's AutoClickerA is a no-drops counter. PlayerStats accumulates swingDelay by adding 50ms for every C03 movement and resetting it to 0 on each swing, so the value at any moment is the time since the last click. On every C03 the check tests that delay: while it stays at or under 100 milliseconds, a threshold increments, and once it passes 100 consecutive no-drop movements the check fires with a 60-second cooldown. Any swing gap above 100ms divides the threshold by 4, and digging divides it by 4 as well.
The module's 180 to 220ms inter-click gap is comfortably above the 100ms no-drop window, so the threshold decays on every cycle and the counter never approaches 100. This is the same tolerance story as the other statistical checks: the check is tuned for 10-plus-CPS autoclickers with millisecond-stable intervals, and the module's half-rate uniform jitter keeps its counter at zero.