Rise 6.1.30 AutoClicker module 2 files, 121 lines

Rise 6.1.30 AutoClicker: Full Source Analysis

Rise 6.1.30's AutoClicker is a ghost-category click injector built as a ModeValue shell over two modes, Normal (default) and Drag Click Simulations, plus a Jitter toggle.

com/alan/clients/module/impl/ghost/AutoClicker.java · GitHub source ↗

Published 2026-08-13 · Updated 2026-08-13

Packets This Module Uses

Analysis

Overview

Rise 6.1.30's AutoClicker is a ghost-category click injector built as a ModeValue shell over two modes, Normal (default) and Drag Click Simulations, plus a Jitter toggle. Instead of forging packets it drives the vanilla input path: PlayerUtil.sendClick sets the attack or use key bind state and fires KeyBinding.onTick, so the game's own tick loop consumes the press and runs clickMouse, which swings first and then attacks. Every module click is therefore a complete vanilla click: one C0A arm animation, and a C02 attack whenever the crosshair is over an entity. The shell also pins mc.leftClickCounter to -1 every render frame so the vanilla click gate never blocks the injected presses, and the Jitter mode writes mouse motion into EntityRenderer.mouseAddedX and mouseAddedY for 100ms after a real click.

Click injection path

PlayerUtil.sendClick(button, state) resolves the key bind for button 0 (attack) or 1 (use item), calls KeyBinding.setKeyBindState and, on the press edge, KeyBinding.onTick, which increments the bind's click counter. The next Minecraft.runTick consumes the counter through isPressed and enters clickMouse while leftClickCounter is at or below zero; the fork's clickMouse fires ClickEvent and AttackEvent through the client event bus, then AttackOrder.sendConditionalSwing (swing only when the target is not an entity) and AttackOrder.sendFixedAttack, which on 1.8 runs swingItem() and then playerController.attackEntity, emitting the C02. The module's own onRender3D sets mc.leftClickCounter = -1 every frame, so the 10-tick penalty vanilla applies when a click has no hit result never stalls the next injection. The Jitter toggle writes EntityRenderer.mouseAddedX and mouseAddedY inside the 100ms window after a real click, scaled by 400 divided by the debug FPS and the per-click direction vector captured in the ClickEvent listener.

Normal mode cadence

NormalAutoClicker runs on TickEvent and computes the inter-click interval as 1000 divided by a per-click random draw: cps is a BoundsNumberValue defaulting to 8-14 with a 0.1 step, and the draw is multiplied by 1.5, so the interval bounces between roughly 47ms and 83ms, a 12-21 CPS stream. Clicks fire only while the attack key is held for at least two ticks, with no GUI open, and never while the use-item key is held. hitSelect suppresses clicks until attackTicks reaches 10 or the player is being hit (hurtTime above 0); breakBlocks skips clicks aimed at a block, or resets curBlockDamageMP when disabled so the injected swings never start a dig. The butterfly branch caps long intervals: whenever the pending interval is 100ms or more, the next one is drawn uniformly from 0-100ms, doubling the effective rate. Right-click mode sends sendClick(1, true) with a 10% chance of a second press.

Drag Click Simulations mode

DragClickAutoClicker simulates a drag click as a run of one-press-per-tick clicks. With the attack key held, each tick decrements nextLength and, with 95% probability, sends sendClick(0, true), so a default drag of 17-18 clicks lands at roughly 20/s; when nextLength runs out, the mode counts down nextDelay ticks (default 6) before arming the next drag with fresh random draws from the length and delay bounds. The result is a burst-and-pause pattern that no single fixed-period model matches, which is why the statistical rate checks in the countering section are the deciding signal rather than any one interval.

source AutoClicker.java (mode shell)

AutoClicker.java49 lines · JavaOriginal ↗
1
package com.alan.clients.module.impl.ghost;
2
3
import com.alan.clients.event.Listener;
4
import com.alan.clients.event.annotations.EventLink;
5
import com.alan.clients.event.impl.input.ClickEvent;
6
import com.alan.clients.event.impl.render.Render3DEvent;
7
import com.alan.clients.module.Module;
8
import com.alan.clients.module.api.Category;
9
import com.alan.clients.module.api.ModuleInfo;
10
import com.alan.clients.module.impl.ghost.autoclicker.DragClickAutoClicker;
11
import com.alan.clients.module.impl.ghost.autoclicker.NormalAutoClicker;
12
import com.alan.clients.value.impl.BooleanValue;
13
import com.alan.clients.value.impl.ModeValue;
14
import net.minecraft.client.Minecraft;
15
import net.minecraft.client.renderer.EntityRenderer;
16
import rip.vantage.commons.util.time.StopWatch;
17
18
@ModuleInfo(aliases = {"module.ghost.autoclicker.name"}, description = "module.ghost.autoclicker.description", category = Category.GHOST)
19
public class AutoClicker extends Module {
20
21
    private final ModeValue mode = new ModeValue("Mode", this)
22
            .add(new NormalAutoClicker("Normal", this))
23
            .add(new DragClickAutoClicker("Drag Click Simulations", this))
24
            .setDefault("Normal");
25
26
    private final BooleanValue jitter = new BooleanValue("Jitter", this, false);
27
28
    private final StopWatch stopWatch = new StopWatch();
29
    private double directionX, directionY;
30
31
    @EventLink
32
    public final Listener<ClickEvent> onClick = event -> {
33
        stopWatch.reset();
34
35
        directionX = (Math.random() - 0.5) * 4;
36
        directionY = (Math.random() - 0.5) * 4;
37
    };
38
39
    @EventLink
40
    public final Listener<Render3DEvent> onRender3D = event -> {
41
        mc.leftClickCounter = -1;
42
43
        if (!stopWatch.finished(100) && this.jitter.getValue() && mc.gameSettings.keyBindUseItem.isKeyDown()) {
44
            EntityRenderer.mouseAddedX = (float) (((Math.random() - 0.5) * 400 / Minecraft.getDebugFPS()) * directionX);
45
            EntityRenderer.mouseAddedY = (float) (((Math.random() - 0.5) * 400 / Minecraft.getDebugFPS()) * directionY);
46
        }
47
    };
48
49
}

What this file does

The shell is 48 lines and holds the injection policy: the ModeValue registers Normal and Drag Click Simulations with Normal as default; the Jitter BooleanValue gates the mouse-noise branch; the ClickEvent listener stamps the per-click direction and resets the StopWatch; onRender3D pins leftClickCounter to -1 and, inside the 100ms post-click window while use-item is held, writes randomized mouseAddedX and mouseAddedY scaled by 400 over the debug FPS. All actual clicking logic lives in the mode classes, which is the standard Rise 6.x ModeValue split.

source NormalAutoClicker.java (default mode)

NormalAutoClicker.java72 lines · JavaOriginal ↗
1
package com.alan.clients.module.impl.ghost.autoclicker;
2
3
import com.alan.clients.event.Listener;
4
import com.alan.clients.event.annotations.EventLink;
5
import com.alan.clients.event.impl.other.AttackEvent;
6
import com.alan.clients.event.impl.other.TickEvent;
7
import com.alan.clients.module.impl.ghost.AutoClicker;
8
import com.alan.clients.util.player.PlayerUtil;
9
import com.alan.clients.value.Mode;
10
import com.alan.clients.value.impl.BooleanValue;
11
import com.alan.clients.value.impl.BoundsNumberValue;
12
import net.minecraft.util.MovingObjectPosition;
13
import rip.vantage.commons.util.time.StopWatch;
14
15
public class NormalAutoClicker extends Mode<AutoClicker> {
16
    private final BoundsNumberValue cps = new BoundsNumberValue("CPS", this, 8, 14, 1, 20, 0.1);
17
    private final BooleanValue rightClick = new BooleanValue("Right Click", this, false);
18
    private final BooleanValue leftClick = new BooleanValue("Left Click", this, true);
19
    private final BooleanValue hitSelect = new BooleanValue("Hit Select", this, false);
20
    private final BooleanValue breakBlocks = new BooleanValue("Break Blocks", this, true);
21
    private final BooleanValue butterFly = new BooleanValue("ButterFly", this, true);
22
23
    private final StopWatch clickStopWatch = new StopWatch();
24
    private int ticksDown, attackTicks;
25
    private long nextSwing;
26
27
    public NormalAutoClicker(String name, AutoClicker parent) {
28
        super(name, parent);
29
    }
30
31
    @EventLink
32
    public final Listener<TickEvent> onTick = event -> {
33
        this.attackTicks++;
34
35
        if (clickStopWatch.finished(this.nextSwing) && (!hitSelect.getValue() || attackTicks >= 10 || mc.thePlayer.hurtTime > 0 && clickStopWatch.finished(this.nextSwing)) && mc.currentScreen == null) {
36
            final long clicks = (long) (this.cps.getRandomBetween().longValue() * 1.5);
37
38
            if (mc.gameSettings.keyBindAttack.isKeyDown()) {
39
                ticksDown++;
40
            } else {
41
                ticksDown = 0;
42
            }
43
44
            if (this.nextSwing >= 50 * 2 && butterFly.getValue()) {
45
                this.nextSwing = (long) (Math.random() * 100);
46
            } else {
47
                this.nextSwing = 1000 / clicks;
48
            }
49
50
            if (rightClick.getValue() && mc.gameSettings.keyBindUseItem.isKeyDown() && !mc.gameSettings.keyBindAttack.isKeyDown()) {
51
                PlayerUtil.sendClick(1, true);
52
53
                if (Math.random() > 0.9) {
54
                    PlayerUtil.sendClick(1, true);
55
                }
56
            }
57
58
            if (leftClick.getValue() && ticksDown > 1 && !mc.gameSettings.keyBindUseItem.isKeyDown() && (!breakBlocks.getValue() || mc.objectMouseOver == null || mc.objectMouseOver.typeOfHit != MovingObjectPosition.MovingObjectType.BLOCK)) {
59
                PlayerUtil.sendClick(0, true);
60
            } else if (!breakBlocks.getValue()) {
61
                mc.playerController.curBlockDamageMP = 0;
62
            }
63
64
            this.clickStopWatch.reset();
65
        }
66
    };
67
68
    @EventLink
69
    public final Listener<AttackEvent> onAttack = event -> {
70
        this.attackTicks = 0;
71
    };
72
}

What this file does

The default mode implements the cadence. A TickEvent gate checks the StopWatch against the computed interval, applies the hitSelect, breakBlocks and right-click conditions, and calls PlayerUtil.sendClick, which is a key-bind injection rather than a packet send. The interval is 1000 divided by cps.getRandomBetween() times 1.5, with the butterfly re-draw below 100ms; attackTicks is reset by AttackEvent so hitSelect can measure time since the last real hit. This file defines the wire fingerprint the countering checks see: one key-bind press per interval, each press becoming a vanilla clickMouse with its C0A swing and its C02 attack.

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

Hawk's FightSpeed caps the C02 attack rate at 16 CPS (the maxCps setting). It records the tick delta between consecutive non-INTERACT InteractEntityEvents, logs a delta only when it is at most RECORD_SENSITIVITY 4 ticks, and after SAMPLES 10 deltas computes avgCps as 20 divided by the mean tick spacing: a 20 CPS stream with one-tick spacing reads exactly 20 and punishes, a 14 CPS stream reads 14 and stays under. Every sample window that exceeds the cap calls punish(1, true), which lifts the violation level; windows below it call reward().

Against the Normal mode the readout is the deciding number: the per-click interval draw of 1000 over (cps times 1.5) with defaults 8-14 produces a 12-21 CPS stream, so the upper half of the range and every butterfly burst (intervals drawn from 0-100ms) sit above 16 and accumulate violations, while the lower half of the range stays under the cap. The Drag mode's one-per-tick run reads a flat 20 CPS and trips immediately, and the trailing 6-tick pause only resets the window. The honest boundary is the same as any rate check: a player who runs the module at the bottom of the range, below 16 CPS sustained, produces deltas the check never scores at the cap.

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

FightSpeedConsistency punishes cadence regularity instead of raw rate. It averages tick deltas in windows of SAMPLE_SIZE 20 clicks, converts each window to a CPS figure, and keeps SAMPLES 5 window averages; when the mean is above MIN_CPS 10 and the standard deviation of the five window averages is below STDEV_THRESHOLD 0.05, it punishes (Cancelless). The 0.05 stdev bound is the false-positive gate: human clicking is irregular enough that five 20-click window means wander more than 0.05 CPS, while a machine period stays flat.

The Rise module's interval is an iid random draw per click, and by the central limit theorem the 20-click window means converge: the per-click jitter averages out inside each window, so the five window averages sit nearly constant and the check fires whenever the window mean exceeds 10 CPS, which the default 8-14 range does on its upper half. The butterfly re-draw below 100ms skews the distribution but does not add window-to-window drift. The Drag mode is a textbook target: a fixed one-tick period produces a stdev near zero. The honest miss is the same CLT caveat: at the bottom of the range the window mean can sit under the 10 CPS gate and the check never arms.

anticheat KillAura (attack and swing windows)

KillAura.java114 lines · Java
1
package me.vrekt.arc.check.combat;
2
3
import me.vrekt.arc.Arc;
4
import me.vrekt.arc.check.Check;
5
import me.vrekt.arc.check.CheckType;
6
import me.vrekt.arc.data.combat.FightData;
7
import me.vrekt.arc.utilties.LocationHelper;
8
import org.bukkit.ChatColor;
9
import org.bukkit.entity.Entity;
10
import org.bukkit.entity.Player;
11
import org.bukkit.util.Vector;
12
13
public class KillAura extends Check {
14
15
    private double maxAngle, maxReach;
16
    private int maxSwingTime, maxAttacks, maxAttackPackets;
17
18
    public KillAura() {
19
        super(CheckType.KILLAURA);
20
21
        maxAngle = Arc.getCheckManager().getValueDouble(CheckType.KILLAURA, "max-direction-angle");
22
        maxSwingTime = Arc.getCheckManager().getValueInt(CheckType.KILLAURA, "max-swing-time");
23
        maxReach = Arc.getCheckManager().getValueDouble(CheckType.KILLAURA, "max-reach");
24
        maxAttacks = Arc.getCheckManager().getValueInt(CheckType.KILLAURA, "max-attacks");
25
        maxAttackPackets = Arc.getCheckManager().getValueInt(CheckType.KILLAURA, "max-attack-packets");
26
27
    }
28
29
    public boolean check(FightData data, Player player) {
30
        result.reset();
31
32
        Entity last = data.getLastAttackedEntity();
33
        Entity entity = data.getAttackedEntity();
34
35
        // Calculate angle stuff.
36
        Vector playerLocation = player.getLocation().toVector();
37
        Vector entityLocation = entity.getLocation().toVector();
38
        double angle = entityLocation.subtract(playerLocation).angle(player.getLocation().getDirection());
39
40
        if (last != null && !entity.equals(last)) {
41
            // check the angle between the two entities
42
            Vector lastLocation = last.getLocation().toVector();
43
            double angleToLast = lastLocation.subtract(playerLocation).angle(player.getLocation().getDirection());
44
            double angleDifference = Math.abs(angleToLast - angle);
45
            double distanceDifference = LocationHelper.distance(last.getLocation(), entity.getLocation());
46
            if (angleDifference > maxAngle && distanceDifference <= maxReach) {
47
                getCheck().setCheckName("Kill Aura " + ChatColor.GRAY + "(Multi)");
48
                result.set(checkViolation(player, "Angle difference greater than allowed. a=" + angleDifference + " e=" + maxAngle));
49
            }
50
        }
51
52
        // check yaw difference.
53
        if (angle > maxAngle) {
54
            getCheck().setCheckName("Kill Aura " + ChatColor.GRAY + "(Direction)");
55
            result.set(checkViolation(player, "Angle distance greater than allowed. a=" + angle + " e=" + maxAngle));
56
        }
57
58
        // check swing time.
59
        long time = System.currentTimeMillis() - data.getLastArmSwing();
60
        if (time > maxSwingTime) {
61
            getCheck().setCheckName("Kill Aura " + ChatColor.GRAY + "(NoSwing)");
62
            result.set(checkViolation(player, "Player did not swing their arm in time."));
63
        }
64
65
        // distance to entity excluding knockback.
66
        double distance = LocationHelper.distance(player.getLocation(), entity.getLocation().subtract(entity.getVelocity()));
67
        // check for reach
68
        if (distance > maxReach) {
69
            getCheck().setCheckName("Kill Aura " + ChatColor.GRAY + "(Reach)");
70
            result.set(checkViolation(player, "Entity is out of players range. d=" + distance + " e=" + maxReach));
71
        }
72
73
        // check max attacks
74
        if (data.getLastAttackCheck() == 0) {
75
            data.setLastAttackCheck(System.currentTimeMillis());
76
        }
77
        long lastAttack = System.currentTimeMillis() - data.getLastAttackCheck();
78
        if (lastAttack >= 1000) {
79
            // check if we exceeded the max attacks in the last second.
80
            int totalAttacks = data.getTotalAttacks();
81
            if (totalAttacks > maxAttacks) {
82
                getCheck().setCheckName("Kill Aura " + ChatColor.GRAY + "(Speed)");
83
                result.set(checkViolation(player, "Attacking too fast. a=" + totalAttacks + " e=" + maxAttacks));
84
            }
85
            // reset data for next check.
86
            data.setTotalAttacks(0);
87
            data.setLastAttackCheck(System.currentTimeMillis());
88
        }
89
90
        getCheck().setCheckName("KillAura");
91
        return result.failed();
92
    }
93
94
    public boolean checkFrequency(FightData data, Player player) {
95
        if (data.getLastAttackCheck() == 0) {
96
            data.setLastAttackCheck(System.currentTimeMillis());
97
            return false;
98
        }
99
100
        long time = System.currentTimeMillis() - data.getLastAttackCheck();
101
        if (time >= 1000) {
102
            data.setLastAttackCheck(System.currentTimeMillis());
103
            int totalPackets = data.getAttackPackets();
104
            if (totalPackets > maxAttackPackets) {
105
                data.setAttackPackets(0);
106
                getCheck().setCheckName("Kill Aura " + ChatColor.GRAY + "(Speed)");
107
                return checkViolation(player, "Attacking too fast a=" + totalPackets + " e=" + maxAttackPackets);
108
            }
109
        }
110
111
        return false;
112
    }
113
114
}

How it counteracts this module

Arc v2's KillAura check runs two rolling-window rate tests on the C02 stream. PacketListener increments totalAttacks on every USE_ENTITY packet and attackPackets on every ATTACK action, and stamps lastArmSwing from every C0A. checkFrequency runs per ATTACK packet: once the rolling one-second window holds more than maxAttackPackets 20 attacks, the check cancels the packet outright; check() runs the same window against totalAttacks with maxAttacks 16 and flags Kill Aura (Speed). The same file holds the reach, direction and swing-time sub-checks, with max-swing-time 80ms: an attack whose last C0A is older than 80ms flags Kill Aura (NoSwing). All defaults come from config.yml (max-direction-angle 1.2, max-swing-time 80, max-reach 4.2, max-attacks 16, max-attack-packets 20).

The Normal mode feeds these windows directly: every injected click is a real clickMouse, so the swing ledger stays fresh and the NoSwing sub-check passes, while the attack counters see one C02 per click. Above roughly 16-20 CPS the window overflows and the check flags, then cancels the 21st attack packet of any second; below that the rate windows stay under the caps. The honest boundary is the swing path: the module always swings, so only the rate half of this check can fire, never the NoSwing half.

anticheat NoSwing (attack-without-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

NCP's fight NoSwing enforces the arm-movement rule. FightListener increments noSwingCount on every attack and decrements it on every PlayerAnimationEvent; check() rewards a single swingless attack (the count stays at one and the violation level decays by 0.9) and punishes the second consecutive swingless attack, resetting the count, adding one violation level and executing the configured actions, whose default is cancel at level 2.

Because the module swings on every injected click through the vanilla path, each C0A lands between the C02s and the ledger stays fed, so this check is an honest gap for AutoClicker: it is designed for killaura variants that attack without swinging, and a swing-always autoclicker never trips it. It belongs in the set as the negative result that separates swing-always clickers from swingless killaura, and it frames why the rate checks above are the real countering layer for this module.

← Back to Analysis Hub