0x0A C0APacketAnimation
Player swings their arm (left click or server-side swing). Empty packet with no payload.
Published 2026-06-18 · Updated 2026-10-14
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| No payload | Completely empty packet |
MCP References
NetHandlerPlayServer.processAnimation()Handler Interface
INetHandlerPlayServerNotes
Vanilla Source
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
Deobfuscated MCP 1.8.9 source of C0APacketAnimation, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/client/C0APacketAnimation.java) at build time and verified present.
Deep Dive
Role in the protocol
The swing packet is the client's arm-swing notice to the server. C0APacketAnimation carries no payload: in 1.8.9 both readPacketData and writePacketData are no-ops, so the wire cost is a single packet id byte (0x0A). EntityPlayerSP.swingItem() fires it at the start of each swing cycle under the isSwingInProgress guard, and the server echoes the action to every tracked player as S0BPacketAnimation with animation id 0. Because the packet is unauthenticated action signaling, its only real content is timing: when it arrives and how often.
Vanilla handling
Server side, NetHandlerPlayServer.processAnimation calls markPlayerActive() then swingItem() on the EntityPlayerMP. The first resets the idle counter used by the player-list AFK kick logic; the second advances the entity's swing animation and broadcasts S0BPacketAnimation to all trackers. Client side, swingItem() sends the packet once per swing cycle, so one swing equals one packet in vanilla. Mining, attacking and block placement all route through the same swing; the attack itself is a separate C02PacketUseEntity.
Why clients touch it
Five distinct uses appear in the corpus. Scaffold modules send C0A after every onPlayerRightClick3d placement so the server sees a swing matching the block place (Memeware, Nekoware, Rise 5.99, Rise 6.x, Sigma, Tenacity). KillAura-family modules send it in place of swingItem() when the local animation must stay off (Spicy Killaura noSwing mode, Rise 5.99 Aura alwaysSwing). Stealer modules swing before opening chests in Nearby mode. Rise 6.x treats C0A as a swing state bit in BadPacketsComponent and sends it from velocity and flight modes to satisfy attack heuristics. Tenacity Crasher floods 2000 to 10000 C0A packets per motion tick. November Recode 2.0's Scaffold sends C0A when its swing setting is off; LiquidSense Dev's Scaffold and Tower do the same, and its MixinEntityPlayerSP rewrites swingItem to emit C0A under the NoSwing module.
Exploit surface
The packet is empty and the server broadcasts the swing to every tracker, so flooding multiplies server work per byte: Tenacity's Crasher pushes up to 10000 per tick to exhaust the server. Swing rate is also a heuristic input: anti-cheats pair C0A with C02PacketUseEntity to count real attacks, which is why velocity modes send C0A before attackEntity (GrimReduceVelocity). A spoofed swing is always safe: the packet carries no position, timestamp or sequence, so the server cannot verify it, only count it.
Server-Side Handling
processAnimation is two calls: markPlayerActive() resets the idle-tick counter that protects against AFK kicks, then swingItem() plays the arm animation and broadcasts S0BPacketAnimation to tracked players. There is no validation on the packet itself: no cooldown, no rate limit, no payload. Any count per tick is accepted and echoed.
Protocol Analysis
The class is a pure marker: readPacketData and writePacketData are no-ops, so a swing costs one VarInt id byte on the wire. The client sends it from EntityPlayerSP.swingItem() once per swing cycle, guarded by isSwingInProgress. The serverbound id 0x0A maps to the arm-swing animation id 0 in the S0BPacketAnimation broadcast. Timing is the only signal: anti-cheats derive swing rate and attack cadence from packet arrival, not from content.
Anti-Cheat Landscape
Attack anti-cheats count C0A arrivals relative to C02PacketUseEntity: swings without attacks are tolerated (mining, air swings), but bursts of swings with no C03 or C02 between them read as scaffold or autoclicker activity. Rise 6.x BadPacketsComponent explicitly tracks swing as a flag and resets it on the next C03PacketPlayer; other modules query that flag before sending spoofed actions. Flooding C0A trips server-side packet-rate limits long before any movement check.
implementation Implementation Cases
The empty swing packet. Scaffold, KillAura, Stealer and velocity modules inject C0A to keep server-side animation consistent with spoofed actions, Rise 6.x tracks it as a bad-packet state bit, and Tenacity's Crasher weaponizes its zero-payload cheapness by flooding thousands per tick.
Send a swing with each block placement so the server sees a human-looking arm action alongside the C08 place packet.
In the post phase of UpdateEvent, after onPlayerRightClick3d returns true, push a raw C0APacketAnimation into the send queue. The pre phase computes the placement target and rotations; the swing is fired only when the placement actually succeeded.
// ===== FILE: Memeware 7.3, me/memewaredevs/client/module/player/Scaffold.java =====
package me.memewaredevs.client.module.player;
import me.hippo.api.lwjeb.annotation.Handler;
import me.memewaredevs.client.event.events.UpdateEvent;
import me.memewaredevs.client.module.Module;
import me.memewaredevs.client.util.blocks.ScaffoldUtils;
import me.memewaredevs.client.util.blocks.misc.BlockInfo;
import me.memewaredevs.client.util.blocks.position.Vec3d;
import me.memewaredevs.client.util.combat.RotationUtils;
import me.memewaredevs.client.util.misc.Timer;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.network.play.client.C0APacketAnimation;
import net.minecraft.potion.Potion;
import net.minecraft.util.BlockPos;
import net.minecraft.util.Vec3;
import org.lwjgl.input.Keyboard;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;
public class Scaffold extends Module {
private int block;
private static List<Block> blockBlacklist = Arrays.asList(Blocks.air, Blocks.water, Blocks.tnt, Blocks.chest,
Blocks.flowing_water, Blocks.lava, Blocks.flowing_lava, Blocks.tnt, Blocks.enchanting_table, Blocks.carpet,
Blocks.glass_pane, Blocks.stained_glass_pane, Blocks.iron_bars, Blocks.snow_layer, Blocks.ice,
Blocks.packed_ice, Blocks.coal_ore, Blocks.diamond_ore, Blocks.emerald_ore, Blocks.chest, Blocks.torch,
Blocks.anvil, Blocks.trapped_chest, Blocks.noteblock, Blocks.jukebox, Blocks.tnt, Blocks.gold_ore,
Blocks.iron_ore, Blocks.lapis_ore, Blocks.sand, Blocks.lit_redstone_ore, Blocks.quartz_ore,
Blocks.redstone_ore, Blocks.wooden_pressure_plate, Blocks.stone_pressure_plate,
Blocks.light_weighted_pressure_plate, Blocks.heavy_weighted_pressure_plate, Blocks.stone_button,
Blocks.wooden_button, Blocks.lever, Blocks.enchanting_table, Blocks.red_flower, Blocks.double_plant,
Blocks.yellow_flower);
private BlockInfo data;
private Timer timer = new Timer();
private int slot, newSlot, oldSlot;
public Scaffold() {
super("Scaffold", Keyboard.KEY_G, Category.PLAYER);
this.slot = -1;
}
@Handler
public Consumer<UpdateEvent> sexoButthole = (event) -> {
if (event.isPre()) {
for (block = 0; block < 45; ++block)
mc.thePlayer.inventoryContainer.getSlot(block).getStack();
int tempSlot = ScaffoldUtils.getBlockSlot();
if (ScaffoldUtils.invCheck()) {
for (int i = 9; i < 36; ++i) {
Item item;
if (!mc.thePlayer.inventoryContainer.getSlot(i).getHasStack()
|| !((item = mc.thePlayer.inventoryContainer.getSlot(i).getStack()
.getItem()) instanceof ItemBlock)
|| blockBlacklist.contains(((ItemBlock) item).getBlock())
|| ((ItemBlock) item).getBlock().getLocalizedName().toLowerCase().contains("chest"))
continue;
ScaffoldUtils.swap(i, 7);
break;
}
}
data = null;
slot = -1;
if (tempSlot != -1) {
newSlot = ScaffoldUtils.getBlockSlot();
oldSlot = mc.thePlayer.inventory.currentItem;
mc.thePlayer.inventory.currentItem = newSlot;
BlockPos blockBelow1 = new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 0.9, mc.thePlayer.posZ);
mc.thePlayer.inventory.currentItem = oldSlot;
if (mc.theWorld.getBlockState(blockBelow1).getBlock() == Blocks.air) {
data = ScaffoldUtils.getBlockData(blockBelow1);
slot = tempSlot;
if (data == null) {
data = ScaffoldUtils.getBlockData(blockBelow1.offsetDown());
}
if (data == null)
return;
float[] rots = RotationUtils.doScaffoldRotations(new Vec3d(blockBelow1));
mc.thePlayer.rotationYawHead = rots[0];
mc.thePlayer.rotationPitchHead = rots[1];
mc.thePlayer.renderYawOffset = rots[0];
event.setYaw(rots[0]);
event.setPitch(rots[1]);
}
}
} else {
if (this.data != null && this.timer.delay(75L) && this.slot != -1) {
mc.thePlayer.inventory.currentItem = newSlot;
if (mc.playerController.onPlayerRightClick3d(mc.thePlayer, mc.theWorld,
mc.thePlayer.inventoryContainer.getSlot(36 + slot).getStack(), data.position, data.face,
ScaffoldUtils.getVec3d(data.position, data.face))) {
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
}
mc.thePlayer.inventory.currentItem = oldSlot;
if (mc.gameSettings.keyBindJump.pressed) {
if (!mc.thePlayer.isMoving() && !mc.gameSettings.keyBindForward.pressed) {
mc.thePlayer.motionZ *= 0.0;
mc.thePlayer.motionX *= 0.0;
mc.thePlayer.motionY = 0.41999998688697815;
}
}
}
}
};
}
// NOTE (AI): Memeware sends the swing directly into the send queue after a successful onPlayerRightClick3d. The same pattern appears in Nekoware's Scaffold, and Rise 5.99's Scaffold sends via PacketUtil.sendPacket in two branches of its placement logic.Swing server-side while controlling the local animation. Spicy's noSwing mode sends the packet instead of swingItem() so the arm does not visibly swing client-side.
On the attack timer elapse, if noSwing is enabled, push new C0APacketAnimation() into the send queue and then send C02PacketUseEntity ATTACK; otherwise call swingItem() locally. Rise 5.99 Aura sends C0A when alwaysSwing is on and the raytrace failed, faking swings at out-of-range targets. Rise 6.x KillAura tracks C0A in onPacketSend to set its swing state bit, consumed by auto-block delay logic.
// ===== FILE: Spicy, info/spicyclient/modules/combat/Killaura.java =====
package info.spicyclient.modules.combat;
import java.awt.Color;
import java.text.DecimalFormat;
import java.util.Comparator;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import org.lwjgl.input.Keyboard;
import info.spicyclient.SpicyClient;
import info.spicyclient.chatCommands.Command;
import info.spicyclient.events.Event;
import info.spicyclient.events.listeners.EventMotion;
import info.spicyclient.events.listeners.EventRenderGUI;
import info.spicyclient.events.listeners.EventUpdate;
import info.spicyclient.modules.Module;
import info.spicyclient.modules.movement.Sprint;
import info.spicyclient.settings.BooleanSetting;
import info.spicyclient.settings.ModeSetting;
import info.spicyclient.settings.NumberSetting;
import info.spicyclient.settings.SettingChangeEvent;
import info.spicyclient.util.MovementUtils;
import info.spicyclient.util.RenderUtils;
import info.spicyclient.util.RotationUtils;
import info.spicyclient.util.Timer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.network.play.client.C02PacketUseEntity;
import net.minecraft.network.play.client.C02PacketUseEntity.Action;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
import net.minecraft.network.play.client.C0APacketAnimation;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings;
public class Killaura extends Module {
public static EntityLivingBase target = null;
public NumberSetting range = new NumberSetting("Range", 4, 1, 6, 0.1);
private NumberSetting aps = new NumberSetting("APS", 10, 0, 20, 1);
private BooleanSetting noSwing = new BooleanSetting("NoSwing", false);
private BooleanSetting disableOnDeath = new BooleanSetting("DisableOnDeath", false);
public BooleanSetting dontHitDeadEntitys = new BooleanSetting("Don't hit dead entitys", true);
public ModeSetting targetsSetting = new ModeSetting("Targets", "Players", "Players", "Animals", "Mobs", "Everything");
public ModeSetting rotationSetting = new ModeSetting("Rotation setting", "lock", "lock", "smooth");
public ModeSetting newAutoblock = new ModeSetting("Autoblock mode", "None", "None", "Vanilla", "Hypixel");
public ModeSetting targetingMode = new ModeSetting("Targeting mode", "Single", "Single", "Switch");
public NumberSetting switchTime = new NumberSetting("Switch Time", 2, 0.1, 10, 0.1);
public BooleanSetting hitOnHurtTime = new BooleanSetting("Hit on hurt time", false);
private static transient boolean blocking = false;
private static transient float lastSmoothYaw, lastSmoothPitch;
private static transient double dynamicAPS = 14;
private static transient Timer dynamicAPSTimer = new Timer();
private int[] randoms = {0,1,0};
public static float sYaw, sPitch, upAndDownPitch = 0;
public static transient double healthBarTarget = 0, healthBar = 0;
// These settings are not used anymore but are still here so you can update old configs
private BooleanSetting autoblock = new BooleanSetting("Autoblock", false);
public ModeSetting targetModeSetting = new ModeSetting("Targets", "Players", "Players", "Animals", "Mobs", "Everything");
public Killaura() {
super("Killaura", Keyboard.KEY_NONE, Category.COMBAT);
resetSettings();
}
private static Timer targetSwitchTimer = new Timer();
private static EntityLivingBase lastTarget = null;
@Override
public void resetSettings() {
this.settings.clear();
this.addSettings(range, aps, noSwing, switchTime, disableOnDeath, dontHitDeadEntitys, targetsSetting, newAutoblock, targetingMode, rotationSetting, hitOnHurtTime);
}
public void onEnable() {
lastSmoothYaw = mc.thePlayer.rotationYaw;
lastSmoothPitch = mc.thePlayer.rotationPitch;
healthBar = new ScaledResolution(mc).getScaledWidth() / 2 - 41;
dynamicAPS = aps.getValue();
upAndDownPitch = 0;
}
public void onDisable() {
healthBar = new ScaledResolution(mc).getScaledWidth() / 2 - 41;
RenderUtils.resetPlayerYaw();
RenderUtils.resetPlayerPitch();
if (mc.thePlayer != null && newAutoblock.is("Hypixel")) {
try {
if (blocking && newAutoblock.is("Hypixel") && mc.thePlayer.inventory.getCurrentItem().getItem() != null && mc.thePlayer.inventory.getCurrentItem().getItem() instanceof ItemSword) {
mc.gameSettings.keyBindUseItem.pressed = false;
mc.playerController.onStoppedUsingItem(mc.thePlayer);
}
} catch (NullPointerException e) {
// TODO: handle exception
}
}
}
public Timer timer = new Timer();
@Override
public void onSettingChange(SettingChangeEvent e) {
if (e.setting != null & e.setting.equals(targetingMode)) {
if (targetingMode.is("Single") && settings.contains(switchTime)) {
settings.remove(switchTime);
this.settings.sort(Comparator.comparing(s -> s == keycode ? 1 : 0));
}
else if (targetingMode.is("Switch") && !settings.contains(switchTime)) {
settings.add(switchTime);
this.settings.sort(Comparator.comparing(s -> s == keycode ? 1 : 0));
}
}
}
public void onEvent(Event e) {
// For the target hud
if (e instanceof EventRenderGUI && target != null) {
if (target == null) {
healthBar = new ScaledResolution(mc).getScaledWidth() / 2 - 41;
return;
}
ScaledResolution sr = new ScaledResolution(mc);
FontRenderer fr = mc.fontRendererObj;
DecimalFormat dec = new DecimalFormat("#");
healthBarTarget = sr.getScaledWidth() / 2 - 41 + (((140) / (target.getMaxHealth())) * (target.getHealth()));
// Lower is faster, higher is slower
double HealthBarSpeed = 5;
if (healthBar > healthBarTarget) {
healthBar = ((healthBar) - ((healthBar - healthBarTarget) / HealthBarSpeed));
}
else if (healthBar < healthBarTarget) {
//healthBar = healthBarTarget;
healthBar = ((healthBar) + ((healthBarTarget - healthBar) / HealthBarSpeed));
}
//Command.sendPrivateChatMessage(healthBarTarget + " : " + healthBar);
int color = (target.getHealth() / target.getMaxHealth() > 0.66f) ? 0xff00ff00 : (target.getHealth() / target.getMaxHealth() > 0.33f) ? 0xffff9900 : 0xffff0000;
color = 0xff00ff00;
float[] hsb = Color.RGBtoHSB(((int)SpicyClient.config.hud.colorSettingRed.getValue()), ((int)SpicyClient.config.hud.colorSettingGreen.getValue()), ((int)SpicyClient.config.hud.colorSettingBlue.getValue()), null);
float hue = hsb[0];
float saturation = hsb[1];
color = Color.HSBtoRGB(hue, saturation, 1);;
if (SpicyClient.config.rainbowgui.isEnabled()) {
float hue1 = System.currentTimeMillis() % (int)((100.5f - SpicyClient.config.rainbowgui.speed.getValue()) * 1000) / (float)((100.5f - SpicyClient.config.rainbowgui.speed.getValue()) * 1000);
color = Color.HSBtoRGB(hue1, 0.65f, 1);
}
Gui.drawRect(sr.getScaledWidth() / 2 - 110, sr.getScaledHeight() / 2 + 100, sr.getScaledWidth() / 2 + 110, sr.getScaledHeight() / 2 + 170, 0xff36393f);
Gui.drawRect(sr.getScaledWidth() / 2 - 41, sr.getScaledHeight() / 2 + 100 + 54, sr.getScaledWidth() / 2 + 100, sr.getScaledHeight() / 2 + 96 + 45, 0xff202225);
Gui.drawRect(sr.getScaledWidth() / 2 - 41, sr.getScaledHeight() / 2 + 100 + 54, healthBar, sr.getScaledHeight() / 2 + 96 + 45, color);
//Gui.drawRect(sr.getScaledWidth() / 2 - 41, sr.getScaledHeight() / 2 + 100 + 54, healthBarTarget, sr.getScaledHeight() / 2 + 96 + 45, color);
GlStateManager.color(1, 1, 1);
GuiInventory.drawEntityOnScreen(sr.getScaledWidth() / 2 - 75, sr.getScaledHeight() / 2 + 165, 25, 1f, 1f, target);
fr.drawString(target.getName(), sr.getScaledWidth() / 2 - 40, sr.getScaledHeight() / 2 + 110, -1);
fr.drawString("HP: ", sr.getScaledWidth() / 2 - 40, sr.getScaledHeight() / 2 + 125, -1);
fr.drawString("§c❤: §f" + dec.format(target.getHealth()), sr.getScaledWidth() / 2 - 40 + fr.getStringWidth("HP: "), sr.getScaledHeight() / 2 + 125, color);
//fr.drawString(dec.format(target.getMaxHealth()) + "", sr.getScaledWidth() / 2 - 40 + fr.getStringWidth("HP: ") + fr.getStringWidth(dec.format(target.getHealth()) + " / "), sr.getScaledHeight() / 2 + 125, color);
/*
RenderHelper.enableGUIStandardItemLighting();
mc.getRenderItem().renderItemAndEffectIntoGUI(target.getHeldItem(), sr.getScaledWidth() / 2 - 40, sr.getScaledHeight() / 2 + 143);
mc.getRenderItem().renderItemAndEffectIntoGUI(target.getCurrentArmor(3), sr.getScaledWidth() / 2 - 10, sr.getScaledHeight() / 2 + 143);
mc.getRenderItem().renderItemAndEffectIntoGUI(target.getCurrentArmor(2), sr.getScaledWidth() / 2 + 20, sr.getScaledHeight() / 2 + 143);
mc.getRenderItem().renderItemAndEffectIntoGUI(target.getCurrentArmor(1), sr.getScaledWidth() / 2 + 50, sr.getScaledHeight() / 2 + 143);
mc.getRenderItem().renderItemAndEffectIntoGUI(target.getCurrentArmor(0), sr.getScaledWidth() / 2 + 80, sr.getScaledHeight() / 2 + 143);
*/
//Gui.drawRect(sr.getScaledWidth() / 2, sr.getScaledHeight() / 2 + 100, sr.getScaledWidth() / 2 + 10, sr.getScaledHeight() / 2 + 150, 0x50000000);
}
if (e instanceof EventUpdate) {
if (e.isPre()) {
//this.additionalInformation = targetingMode.getMode() + SpicyClient.hud.separator + rotationSetting.getMode();
this.additionalInformation = "R: " + range.getValue() + SpicyClient.hud.separator + "APS: " + aps.getValue();
}
}
if (e instanceof EventMotion) {
if (e.isPre()) {
Sprint s = SpicyClient.config.sprint;
if (mc.thePlayer.isDead && disableOnDeath.isEnabled()) {
toggled = false;
}
target = null;
EventMotion event = (EventMotion) e;
List<EntityLivingBase> targets = (List<EntityLivingBase>) mc.theWorld.loadedEntityList.stream().filter(EntityLivingBase.class::isInstance).collect(Collectors.toList());
targets.sort(Comparator.comparingDouble(entity -> ((EntityLivingBase)entity).getDistanceToEntity(mc.thePlayer)));
List<EntityLivingBase> targetsToRemove = (List<EntityLivingBase>) mc.theWorld.loadedEntityList.stream().filter(EntityLivingBase.class::isInstance).collect(Collectors.toList());
targetsToRemove.clear();
if (dontHitDeadEntitys.enabled) {
targets = targets.stream().filter(entity -> entity.getDistanceToEntity(mc.thePlayer) < range.getValue() && entity != mc.thePlayer && !entity.isDead && entity.getHealth() > 0).collect(Collectors.toList());
}else {
targets = targets.stream().filter(entity -> entity.getDistanceToEntity(mc.thePlayer) < range.getValue() && entity != mc.thePlayer && !entity.isDead).collect(Collectors.toList());
}
if (targets.isEmpty()) {
healthBar = new ScaledResolution(mc).getScaledWidth() / 2 - 41;
stopBlocking();
RenderUtils.resetPlayerYaw();
RenderUtils.resetPlayerPitch();
return;
}
if (!targets.isEmpty()) {
for (EntityLivingBase a : targets) {
if (a.getDistanceToEntity(mc.thePlayer) > range.getValue()) {
targetsToRemove.add(a);
}
}
int target_filter = targetsSetting.index;
if (target_filter == 0) {
// kill aura will only hit non invisible players
//targets.stream().filter(EntityPlayer.class::isInstance).collect(Collectors.toList());
for (EntityLivingBase a : targets) {
if (a instanceof EntityPlayer) {
}else {
targetsToRemove.add(a);
}
}
}
else if (target_filter == 1) {
// kill aura will only hit animals
//targets.stream().filter(EntityAnimal.class::isInstance).collect(Collectors.toList());
for (EntityLivingBase a : targets) {
if (a instanceof EntityAnimal) {
}else {
targetsToRemove.add(a);
}
}
}
else if (target_filter == 2) {
// kill aura will only hit mobs
//targets.stream().filter(EntityMob.class::isInstance).collect(Collectors.toList());
for (EntityLivingBase a : targets) {
if (a instanceof EntityMob) {
}else {
targetsToRemove.add(a);
}
}
}
else if (target_filter == 3) {
// kill aura will hit everything
}else {
}
targets.removeAll(targetsToRemove);
if (targets.isEmpty()) {
RenderUtils.resetPlayerYaw();
RenderUtils.resetPlayerPitch();
stopBlocking();
return;
}
if (newAutoblock.getMode() != "None") {
startBlocking();
}
target = targets.get(0);
if (target instanceof EntityPlayer && SpicyClient.config.antibot.isEnabled() && !mc.isSingleplayer() && mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel")) {
try {
if (mc.getNetHandler().getPlayerInfo(((EntityPlayer)target).getUniqueID()).responseTime > 1) {
Command.sendPrivateChatMessage("A watchdog bot was removed from your game");
mc.theWorld.removeEntity(target);
return;
}
} catch (NullPointerException e1) {
e1.printStackTrace();
}
}
if (targetingMode.is("Switch")) {
if (lastTarget != null && targets.contains(lastTarget)) {
target = lastTarget;
if (targetSwitchTimer.hasTimeElapsed((long) (switchTime.getValue()*1000), true)) {
target = targets.get(0);
}
}
}
if (target != lastTarget) {
/*
Command.sendPrivateChatMessage("F: " + target.getDisplayName().getFormattedText());
Command.sendPrivateChatMessage("U: " + target.getDisplayName().getUnformattedText());
Command.sendPrivateChatMessage("UC: " + target.getDisplayName().getUnformattedTextForChat());
Command.sendPrivateChatMessage("C: " + target.getCustomNameTag());
if (target instanceof EntityPlayer) {
Command.sendPrivateChatMessage("Ping: " + mc.getNetHandler().getPlayerInfo(((EntityPlayer)target).getUniqueID()).responseTime);
}
*/
}
// if (mc.netHandler.getPlayerInfo(entity.asEntityPlayer().uniqueID)?.responseTime == 0)
// return true
lastTarget = target;
// This mostly removes a bug which would cause you get get kicked for invalid player movement
if (target.posX == mc.thePlayer.posX && target.posY == mc.thePlayer.posY && target.posZ == mc.thePlayer.posZ) {
}else {
if (rotationSetting.is("lock") || rotationSetting.getMode() == "lock") {
//event.setYaw(getRotations(target)[0]+10);
//event.setPitch(RotationUtils.getRotations(target)[1]);
float[] rotations = RotationUtils.getRotations(target);
event.setYaw(rotations[0]);
event.setYaw(rotations[0] - 2);
if (event.pitch < -90) {
event.setPitch(-90);
}
upAndDownPitch += 2 + new Random().nextDouble();
if (upAndDownPitch >= 20) {
upAndDownPitch = 0;
event.setPitch(rotations[1] - upAndDownPitch);
}
else if (upAndDownPitch >= 10) {
event.setPitch(rotations[1] + 10 - (upAndDownPitch - 10));
}
else {
event.setPitch(rotations[1] - upAndDownPitch);
}
if (event.pitch < -90) {
event.setPitch(-90);
}
//Command.sendPrivateChatMessage(aacB);
}
else if (rotationSetting.is("smooth") || rotationSetting.getMode() == "smooth") {
upAndDownPitch/=2;
customRots(event, target);
/*
try {
getSmoothRotations(event);
} catch (NullPointerException e2) {
this.lastSmoothPitch = event.getPitch();
this.lastSmoothYaw = event.getYaw();
try {
getSmoothRotations(event);
} catch (NullPointerException e3) {
return;
}
}
*/
}
// Put client side rotation code here later
}
Random random = new Random();
startBlocking();
if (hitOnHurtTime.isEnabled()) {
if (target.hurtTime > 2) {
return;
}
}
if (timer.hasTimeElapsed((long) (1000/(aps.getValue() + new Random().nextFloat())), true)) {
if (s.toggled) {
mc.thePlayer.setSprinting(true);
}
stopBlocking();
if (noSwing.enabled) {
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
}else {
mc.thePlayer.swingItem();
}
mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target, C02PacketUseEntity.Action.ATTACK));
float sharpLevel = EnchantmentHelper.func_152377_a(mc.thePlayer.inventory.getCurrentItem(), target.getCreatureAttribute());
if (sharpLevel > 0.0F) {
mc.thePlayer.onEnchantmentCritical(target);
}
if (SpicyClient.config.criticals.isEnabled() && mc.thePlayer.onGround) {
mc.thePlayer.onCriticalHit(target);
}
if (s.toggled) {
mc.thePlayer.setSprinting(true);
}
if (newAutoblock.is("Hypixel") && !blocking) {
blockHypixel(target);
//startBlocking(true);
//Random r = new Random();
//mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(new BlockPos(-0.410153517, -0.4083644, -0.4186343), 255, mc.thePlayer.getHeldItem(), 0, 0, 0));
}
//if (dynamicAPSTimer.hasTimeElapsed(10000 + (new Random().nextInt(10) * 1000), true) && mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel")) {
//Command.sendPrivateChatMessage("Packet sent");
//mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C03PacketPlayer.C05PacketPlayerLook(0, 0, MovementUtils.isOnGround(0.000001)));
//}
}
}else {
healthBar = new ScaledResolution(mc).getScaledWidth() / 2 - 41;
stopBlocking();
RenderUtils.resetPlayerYaw();
RenderUtils.resetPlayerPitch();
return;
}
}
}
}
private void blockHypixel(EntityLivingBase ent) {
if (ent == null) {
return;
}
sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getCurrentEquippedItem());
float[] rotations = RotationUtils.getRotations(target);
mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C02PacketUseEntity(ent, RotationUtils.getVectorForRotation(rotations[0], rotations[1])));
mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C02PacketUseEntity(ent, Action.INTERACT));
mc.getNetHandler().getNetworkManager().sendPacketNoEvent(new C08PacketPlayerBlockPlacement(new BlockPos(-1, -1, -1), 255, mc.thePlayer.getHeldItem(), 0, 0, 0));
}
public boolean sendUseItem(EntityPlayer playerIn, World worldIn, ItemStack itemStackIn)
{
if (mc.playerController.currentGameType == WorldSettings.GameType.SPECTATOR)
{
return false;
}
else
{
if (itemStackIn == null) {
return false;
}
mc.playerController.syncCurrentPlayItem();
int i = itemStackIn.stackSize;
ItemStack itemstack = itemStackIn.useItemRightClick(worldIn, playerIn);
if (itemstack != itemStackIn || itemstack != null && itemstack.stackSize != i)
{
playerIn.inventory.mainInventory[playerIn.inventory.currentItem] = itemstack;
if (itemstack.stackSize == 0)
{
playerIn.inventory.mainInventory[playerIn.inventory.currentItem] = null;
}
return true;
}
else
{
return false;
}
}
}
private void stopBlocking() {
try {
if (blocking && newAutoblock.is("Hypixel") && mc.thePlayer.inventory.getCurrentItem().getItem() != null && mc.thePlayer.inventory.getCurrentItem().getItem() instanceof ItemSword) {
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.DOWN));
mc.gameSettings.keyBindUseItem.pressed = false;
}
} catch (NullPointerException e) {
blocking = false;
}
blocking = false;
return;
}
private int interactBlock = 0;
private void startBlocking() {
if(newAutoblock.getMode() == "None") {
return;
}
if (blocking) {
if ((mc.thePlayer.inventory.getCurrentItem() != null) && ((mc.thePlayer.inventory.getCurrentItem().getItem() instanceof ItemSword))) {
sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getCurrentEquippedItem());
}
return;
}
blocking = true;
if (newAutoblock.is("Hypixel") && (mc.thePlayer.inventory.getCurrentItem() != null) && ((mc.thePlayer.inventory.getCurrentItem().getItem() instanceof ItemSword))) {
blockHypixel(target);
/*
if (target != null && interactAutoblock) {
//mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target, new Vec3(randomNumber(-50, 50) / 100.0, randomNumber(0, 200) / 100.0, randomNumber(-50, 50) / 100.0)));
mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target, C02PacketUseEntity.Action.INTERACT));
mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target, C02PacketUseEntity.Action.INTERACT));
mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target, C02PacketUseEntity.Action.INTERACT));
mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target, C02PacketUseEntity.Action.INTERACT));
}
mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(getHypixelBlockpos(mc.getSession().getUsername()), 255, mc.thePlayer.inventory.getCurrentItem(), 0.0f, 0.0f, 0.0f));
//mc.thePlayer.sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(mc.thePlayer.inventory.getCurrentItem()));
mc.thePlayer.setItemInUse(mc.thePlayer.getCurrentEquippedItem(), 10);
//mc.gameSettings.keyBindUseItem.pressed = true;
//mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getCurrentEquippedItem());
//mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.inventory.getCurrentItem());
*
*/
}
else if (newAutoblock.is("Vanilla") && (mc.thePlayer.inventory.getCurrentItem() != null) && ((mc.thePlayer.inventory.getCurrentItem().getItem() instanceof ItemSword))) {
mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.inventory.getCurrentItem());
}
}
// I found these methods on github somewhere
public static int randomNumber(final int max, final int min) {
return Math.round(min + (float)Math.random() * (max - min));
}
private int randomNumber() {
return -1 + (int) (Math.random() * ((1 - (-1)) + 1));
}
public float[] getCustomRotsChange(float yaw, float pitch, double x, double y, double z){
double xDiff = x - mc.thePlayer.posX;
double zDiff = z - mc.thePlayer.posZ;
double yDiff = y - mc.thePlayer.posY;
double dist = MathHelper.sqrt_double(xDiff * xDiff + zDiff * zDiff);
double mult = (1/(dist+0.0001)) * 2;
if(mult > 0.2)
mult = 0.2;
if(!mc.theWorld.getEntitiesWithinAABBExcludingEntity(mc.thePlayer, mc.thePlayer.boundingBox).contains(target)){
x += 0.3 * randoms[0];
y -= 0.4 + mult * randoms[1];
z += 0.3 * randoms[2];
}
xDiff = x - mc.thePlayer.posX;
zDiff = z - mc.thePlayer.posZ;
yDiff = y - mc.thePlayer.posY;
float yawToEntity = (float) (Math.atan2(zDiff, xDiff) * 180.0D / 3.141592653589793D) - 90.0F;
float pitchToEntity = (float) -(Math.atan2(yDiff, dist) * 180.0D / 3.141592653589793D);
return new float[]{MathHelper.wrapAngleTo180_float(-(yaw- (float) yawToEntity)), -MathHelper.wrapAngleTo180_float(pitch - (float) pitchToEntity) - 2.5F};
}
public void customRots(EventMotion em, EntityLivingBase ent) {
if (target == null) {
lastSmoothYaw = mc.thePlayer.rotationYaw;
lastSmoothPitch = mc.thePlayer.rotationPitch;
return;
}
float speed = 180;
float sYaw = (float) updateRotation((float) lastSmoothYaw, (float) RotationUtils.getRotations(target)[0], speed);
float sPitch = (float) updateRotation((float) lastSmoothPitch, (float) RotationUtils.getRotations(target)[1], speed);
//Command.sendPrivateChatMessage("Old: " + sYaw + " : " + sPitch);
//double move = 5;
//move = new Random().nextInt(3) + 1;
//move += new Random().nextDouble();
//sYaw = (float) updateRotation((float) lastSmoothYaw, (float) RotationUtils.getRotations(target)[0], (float)((lastSmoothYaw - RotationUtils.getRotations(target)[0]) / move));
//sPitch = (float) updateRotation((float) lastSmoothPitch, (float) RotationUtils.getRotations(target)[1], (float)((lastSmoothPitch - RotationUtils.getRotations(target)[1]) / move));
//Command.sendPrivateChatMessage("New: " + sYaw + " : " + sPitch);
lastSmoothYaw = updateRotation(lastSmoothYaw, sYaw, 360);
//lastSmoothYaw = sYaw;
lastSmoothPitch = updateRotation(lastSmoothPitch, sPitch, 360);
if(lastSmoothPitch > 90) {
lastSmoothPitch = 90;
} else if (lastSmoothPitch < -90) {
lastSmoothPitch = -90;
}
//Command.sendPrivateChatMessage("Done: " + sYaw + " : " + sPitch);
//Command.sendPrivateChatMessage("Current: " + sYaw + " : " + sPitch);
//Command.sendPrivateChatMessage("Intended: " + RotationUtils.getRotations(target)[0] + " : " + RotationUtils.getRotations(target)[1]);
//Command.sendPrivateChatMessage(" ");
em.setYaw(lastSmoothYaw);
em.setPitch(lastSmoothPitch);
}
public static float updateRotation(float current, float intended, float factor) {
float var4 = MathHelper.wrapAngleTo180_float(intended - current);
if (var4 > factor) {
var4 = factor;
}
if (var4 < -factor) {
var4 = -factor;
}
return current + var4;
}
}
// NOTE (AI): Spicy shows the cleanest client/server swing split: noSwing mode pushes C0APacketAnimation so the server sees the swing while the local arm stays still. Rise 5.99's Aura instead sends C0A as an extra swing when the raytrace misses, and Rise 6.x KillAura only watches C0A on the send event to drive its swing state.Chest stealing. Sends C0A before the right-click that opens a nearby chest, mimicking an interaction swing.
Nearby mode scans a 3-block radius each delay tick; for every chest not yet emptied, PacketUtil.sendPacket(new C0APacketAnimation()) fires, then onPlayerRightClick opens it. Emptied positions are cleared on S08PacketPlayerPosLook and on enable.
// ===== FILE: Memeware 7.3, me/memewaredevs/client/module/player/Stealer.java =====
package me.memewaredevs.client.module.player;
import me.hippo.api.lwjeb.annotation.Handler;
import me.memewaredevs.client.event.events.PacketInEvent;
import me.memewaredevs.client.event.events.UpdateEvent;
import me.memewaredevs.client.module.Module;
import me.memewaredevs.client.util.packet.PacketUtil;
import me.memewaredevs.client.util.blocks.position.Vec3d;
import net.minecraft.block.Block;
import net.minecraft.block.BlockChest;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.network.play.client.C0APacketAnimation;
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import static org.lwjgl.input.Keyboard.KEY_K;
public class Stealer extends Module {
public Stealer() {
super("Stealer", KEY_K, Category.PLAYER);
this.addModes("Normal", "Nearby");
this.addBoolean("Close", true);
this.addDouble("Delay", 4, 0, 12);
}
private final List<BlockPos> emptiedChests = new ArrayList();
@Handler
public Consumer<UpdateEvent> eventConsumer0 = event -> {
if (mc.currentScreen instanceof GuiChest) {
if (!isEmpty(mc.thePlayer.openContainer)) {
for (Slot slot : (List<Slot>) mc.thePlayer.openContainer.inventorySlots) {
if (slot != null && slot.getStack() != null && mc.thePlayer.ticksExisted % Math.round(this.getDouble("Delay")) == 0) {
mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, slot.slotNumber, 0, 1, mc.thePlayer);
return;
}
}
} else {
if (this.getBool("Close") || isMode("Nearby")) {
mc.displayGuiScreen(null);
}
}
return;
}
if (isMode("Nearby")) {
int maxDist = 3;
if (mc.currentScreen == null) {
if (mc.thePlayer.ticksExisted % Math.round(this.getDouble("Delay")) == 0) {
for (int y = maxDist; y >= -maxDist; y--) {
for (int x = -maxDist; x < maxDist; x++) {
for (int z = -maxDist; z < maxDist; z++) {
int posX = ((int) Math.floor(mc.thePlayer.posX) + x);
int posY = ((int) Math.floor(mc.thePlayer.posY) + y);
int posZ = ((int) Math.floor(mc.thePlayer.posZ) + z);
if (mc.thePlayer.getDistanceSq(mc.thePlayer.posX + x, mc.thePlayer.posY + y, mc.thePlayer.posZ + z) <= 16.0) {
Block block = mc.theWorld.getBlockState(new BlockPos(posX, posY, posZ)).getBlock();
if (block instanceof BlockChest) {
BlockPos pos = new BlockPos(posX, posY, posZ);
if (!this.emptiedChests.contains(pos)) {
this.emptiedChests.add(pos);
PacketUtil.sendPacket(new C0APacketAnimation());
mc.playerController.onPlayerRightClick(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem(), new BlockPos(posX, posY, posZ), EnumFacing.DOWN, new Vec3d(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ));
}
}
}
}
}
}
}
}
}
};
@Handler
public Consumer<PacketInEvent> eventConsumer1 = event -> {
if (event.getPacket() instanceof S08PacketPlayerPosLook && mc.getNetHandler() != null && mc.getNetHandler().doneLoadingTerrain) {
emptiedChests.clear();
}
};
@Override
public void onEnable() {
this.emptiedChests.clear();
}
public boolean isEmpty(final Container container) {
boolean isEmpty = true;
int maxSlot = (container.inventorySlots.size() == 90) ? 54 : 27;
for (int i = 0; i < maxSlot; ++i) {
if (container.getSlot(i).getHasStack()) {
isEmpty = false;
}
}
return isEmpty;
}
}
// NOTE (AI): The swing here is cosmetic: it precedes the open interaction so the server sees the full click sequence. Nekoware's Stealer duplicates the file.A shared state tracker, not a user module: flags swing=true on any outgoing C0A and resets all flags on the next C03PacketPlayer. Other modules call BadPacketsComponent.bad() to decide whether spoofed packets are safe to send.
PacketSendEvent at VERY_HIGH priority sets one boolean per packet family: slot (C09), swing (C0A), attack (C02), block (C08/C07), inventory (C0E/C16 OPEN_INVENTORY/C0D). C03PacketPlayer clears everything. Modules gate spoofed sends on bad() so they never fire mid-sequence.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/component/impl/player/BadPacketsComponent.java =====
package com.alan.clients.component.impl.player;
import com.alan.clients.component.Component;
import com.alan.clients.event.Listener;
import com.alan.clients.event.Priorities;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.*;
import static net.minecraft.network.play.client.C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT;
public final class BadPacketsComponent extends Component {
private static boolean slot, attack, swing, block, inventory;
public static boolean bad() {
return bad(true, true, true, true, true);
}
public static boolean bad(final boolean slot, final boolean attack, final boolean swing, final boolean block, final boolean inventory) {
return (BadPacketsComponent.slot && slot) ||
(BadPacketsComponent.attack && attack) ||
(BadPacketsComponent.swing && swing) ||
(BadPacketsComponent.block && block) ||
(BadPacketsComponent.inventory && inventory);
}
@EventLink(value = Priorities.VERY_HIGH)
public final Listener<PacketSendEvent> onPacketSend = event -> {
final Packet<?> packet = event.getPacket();
if (packet instanceof C09PacketHeldItemChange) {
slot = true;
} else if (packet instanceof C0APacketAnimation) {
swing = true;
} else if (packet instanceof C02PacketUseEntity) {
attack = true;
// if (block) ChatUtil.display("BadPackets");
} else if (packet instanceof C08PacketPlayerBlockPlacement || packet instanceof C07PacketPlayerDigging) {
block = true;
// if (attack) ChatUtil.display("BadPackets");
} else if (packet instanceof C0EPacketClickWindow ||
(packet instanceof C16PacketClientStatus && ((C16PacketClientStatus) packet).getStatus() == OPEN_INVENTORY_ACHIEVEMENT) ||
packet instanceof C0DPacketCloseWindow) {
inventory = true;
} else if (packet instanceof C03PacketPlayer) {
reset();
}
};
public static void reset() {
slot = false;
swing = false;
attack = false;
block = false;
inventory = false;
}
}
// NOTE (AI): C0A is one of five flags. The component exists so velocity and disabler modes can check that no swing, click or attack is in flight before injecting packets, which is exactly what GrimReduceVelocity and WatchdogDisabler do.Lag or kill the server by flooding zero-payload swings, exploiting the server's per-packet broadcast cost.
On every MotionEvent, loop 2000 iterations (Vanilla mode) or 10000 (Boom mode) pushing new C0APacketAnimation() into the send queue in a single tick.
// ===== FILE: Tenacity 6.0, dev/tenacity/module/impl/exploit/Crasher.java =====
package dev.tenacity.module.impl.exploit;
import dev.tenacity.event.IEventListener;
import dev.tenacity.event.impl.player.MotionEvent;
import dev.tenacity.module.Module;
import dev.tenacity.module.ModuleCategory;
import dev.tenacity.setting.impl.ModeSetting;
import dev.tenacity.util.misc.ChatUtil;
import dev.tenacity.util.misc.TimerUtil;
import io.netty.buffer.Unpooled;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.client.C0APacketAnimation;
import net.minecraft.network.play.client.C17PacketCustomPayload;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.TimeUnit;
import java.io.*;
import java.lang.Thread;
public final class Crasher extends Module {
private final TimerUtil timerUtil = new TimerUtil();
private final ModeSetting mode = new ModeSetting("Mode", "Vanilla", "Boom");
public Crasher() {
super("Crasher", "Makes server go kaboom", ModuleCategory.EXPLOIT);
initializeSettings(mode);
}
private final IEventListener<MotionEvent> onMotionEvent = event -> {
switch(mode.getCurrentMode()) {
case "Vanilla": {
for (int i = 0; i < 2000; i++) {
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
}
break;
}
case "Boom": {
for (int i = 0; i < 10000; i++) {
mc.thePlayer.sendQueue.addToSendQueue(new C0APacketAnimation());
}
break;
}
}
};
}
// NOTE (AI): Each C0A costs the server a markPlayerActive call, a swingItem call and an S0BPacketAnimation broadcast to every tracker; 10000 per tick is a broadcast storm. The Boom mode name is literal.Pair a swing with the velocity-reduction attack so the attack sequence looks legitimate to anti-cheats.
On PreUpdateEvent, if within 14 ticks of taking velocity and BadPacketsComponent.bad() is false, send C0APacketAnimation then call playerController.attackEntity on the nearest target. The swing precedes the attack so the server sees a clean swing-attack pair.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/combat/velocity/GrimReduceVelocity.java =====
package com.alan.clients.module.impl.combat.velocity;
import com.alan.clients.component.impl.player.BadPacketsComponent;
import com.alan.clients.component.impl.player.TargetComponent;
import com.alan.clients.event.Listener;
import com.alan.clients.event.Priorities;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PreUpdateEvent;
import com.alan.clients.module.impl.combat.Velocity;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.value.Mode;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.network.play.client.C0APacketAnimation;
import java.util.List;
public final class GrimReduceVelocity extends Mode<Velocity> {
public GrimReduceVelocity(String name, Velocity parent) {
super(name, parent);
}
@EventLink(value = Priorities.VERY_LOW)
public final Listener<PreUpdateEvent> onPreUpdate = event -> {
if (getParent().onSwing.getValue() && !mc.thePlayer.isSwingInProgress ||
mc.thePlayer.ticksExisted <= 20) return;
List<EntityLivingBase> targets = TargetComponent.getTargets(7);
if (targets.isEmpty()) return;
if (mc.thePlayer.ticksSinceVelocity <= 14 && !BadPacketsComponent.bad()) {
PacketUtil.send(new C0APacketAnimation());
mc.playerController.attackEntity(mc.thePlayer, targets.get(0));
}
};
}
// NOTE (AI): The C0A send is gated on the bad-packet flag, showing how the swing state bit is consumed. AACVelocity, WatchdogPredictionVelocity and WatchdogLongJump import C0A for the same family; BlockFlight and UnKnownAC send it during flight, AntiFireBall and Clutch send it before their own actions.Swing for the tower placement: send C0A when the swing setting is off, mirroring the swingItem() path.
After onPlayerRightClick returns true, swing via swingItem() when the Swing setting is on, otherwise send C0A through the net handler. The C09 slot switch and the C04 packet-mode ladder are this file's other packet faces.
// ===== FILE: LiquidSense Dev, net/ccbluex/liquidbounce/features/module/modules/world/Tower.java =====
/*
* LiquidBounce Hacked Client
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
* https://github.com/CCBlueX/LiquidBounce/
*/
package net.ccbluex.liquidbounce.features.module.modules.world;
import net.ccbluex.liquidbounce.LiquidBounce;
import net.ccbluex.liquidbounce.event.*;
import net.ccbluex.liquidbounce.features.module.Module;
import net.ccbluex.liquidbounce.features.module.ModuleCategory;
import net.ccbluex.liquidbounce.features.module.ModuleInfo;
import net.ccbluex.liquidbounce.ui.font.Fonts;
import net.ccbluex.liquidbounce.utils.*;
import net.ccbluex.liquidbounce.utils.block.BlockUtils;
import net.ccbluex.liquidbounce.utils.block.PlaceInfo;
import net.ccbluex.liquidbounce.utils.render.RenderUtils;
import net.ccbluex.liquidbounce.utils.timer.TickTimer;
import net.ccbluex.liquidbounce.value.BoolValue;
import net.ccbluex.liquidbounce.value.FloatValue;
import net.ccbluex.liquidbounce.value.IntegerValue;
import net.ccbluex.liquidbounce.value.ListValue;
import net.minecraft.block.BlockAir;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C09PacketHeldItemChange;
import net.minecraft.network.play.client.C0APacketAnimation;
import net.minecraft.potion.Potion;
import net.minecraft.util.*;
import net.minecraft.stats.StatList;
import org.lwjgl.input.Keyboard;
import net.minecraft.util.Vec3;
import java.awt.*;
@ModuleInfo(name = "Tower", description = "Automatically builds a tower beneath you.", category = ModuleCategory.WORLD, keyBind = Keyboard.KEY_O)
public class Tower extends Module {
/**
* OPTIONS
*/
private final ListValue modeValue = new ListValue("Mode", new String[] {"Hypixel","Jump", "Motion", "ConstantMotion", "MotionTP", "Packet", "Teleport", "AAC3.3.9"}, "Motion");
private final BoolValue autoBlockValue = new BoolValue("AutoBlock", true);
private final BoolValue stayAutoBlock = new BoolValue("StayAutoBlock", false);
private final BoolValue swingValue = new BoolValue("Swing", true);
private final BoolValue stopWhenBlockAbove = new BoolValue("StopWhenBlockAbove", false);
private final BoolValue rotationsValue = new BoolValue("Rotations", true);
private final BoolValue keepRotationValue = new BoolValue("KeepRotation", false);
private final BoolValue onJumpValue = new BoolValue("OnJump", false);
private final ListValue placeModeValue = new ListValue("PlaceTiming", new String[]{"Pre", "Post"}, "Post");
private final FloatValue timerValue = new FloatValue("Timer", 1F, 0F, 10F);
// Jump mode
private final FloatValue jumpMotionValue = new FloatValue("JumpMotion", 0.42F, 0.3681289F, 0.79F);
private final IntegerValue jumpDelayValue = new IntegerValue("JumpDelay", 0, 0, 20);
// ConstantMotion
private final FloatValue constantMotionValue = new FloatValue("ConstantMotion", 0.42F, 0.1F, 1F);
private final FloatValue constantMotionJumpGroundValue = new FloatValue("ConstantMotionJumpGround", 0.79F, 0.76F, 1F);
// Teleport
private final FloatValue teleportHeightValue = new FloatValue("TeleportHeight", 1.15F, 0.1F, 5F);
private final IntegerValue teleportDelayValue = new IntegerValue("TeleportDelay", 0, 0, 20);
private final BoolValue teleportGroundValue = new BoolValue("TeleportGround", true);
private final BoolValue teleportNoMotionValue = new BoolValue("TeleportNoMotion", false);
// Render
private final BoolValue counterDisplayValue = new BoolValue("Counter", true);
/**
* MODULE
*/
// Target block
private PlaceInfo placeInfo;
// Rotation lock
private Rotation lockRotation;
// Mode stuff
private final TickTimer timer = new TickTimer();
private double jumpGround = 0;
// AutoBlock
private int slot;
@Override
public void onDisable() {
if (mc.thePlayer == null) return;
mc.timer.timerSpeed = 1F;
lockRotation = null;
if (slot != mc.thePlayer.inventory.currentItem)
mc.getNetHandler().addToSendQueue(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
}
@EventTarget
public void onMotion(final MotionEvent event) {
if (onJumpValue.get() && !mc.gameSettings.keyBindJump.isKeyDown())
return;
// Lock Rotation
if (rotationsValue.get() && keepRotationValue.get() && lockRotation != null)
RotationUtils.setTargetRotation(lockRotation);
mc.timer.timerSpeed = timerValue.get();
final EventState eventState = event.getEventState();
if (placeModeValue.get().equalsIgnoreCase(eventState.getStateName()))
place();
if (eventState == EventState.PRE) {
placeInfo = null;
timer.update();
if (autoBlockValue.get() ? InventoryUtils.findAutoBlockBlock() != -1 : mc.thePlayer.getHeldItem() != null
&& mc.thePlayer.getHeldItem().getItem() instanceof ItemBlock) {
if (!stopWhenBlockAbove.get() || BlockUtils.getBlock(new BlockPos(mc.thePlayer.posX,
mc.thePlayer.posY + 2, mc.thePlayer.posZ)) instanceof BlockAir)
move();
final BlockPos blockPos = new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1D, mc.thePlayer.posZ);
if (mc.theWorld.getBlockState(blockPos).getBlock() instanceof BlockAir) {
if (search(blockPos) && rotationsValue.get()) {
final VecRotation vecRotation = RotationUtils.faceBlock(blockPos);
if (vecRotation != null) {
RotationUtils.setTargetRotation(vecRotation.getRotation());
placeInfo.setVec3(vecRotation.getVec());
}
}
}
}
}
}
//Send jump packets, bypasses Hypixel.
private void fakeJump() {
mc.thePlayer.isAirBorne = true;
mc.thePlayer.triggerAchievement(StatList.jumpStat);
}
/**
* Move player
*/
private void move() {
switch (modeValue.get().toLowerCase()) {
case "hypixel":
if(this.getBlocksAmount() > 0) {
if(mc.thePlayer.moveForward != 0.0f || mc.thePlayer.moveStrafing != 0.0) {
double gay2 = 0.419999215712222222222531351325;
double lit = 0.42d;
double baseSpeed = 0.2873D;
if (mc.thePlayer.isPotionActive(Potion.moveSpeed)) {
int amplifier = mc.thePlayer.getActivePotionEffect(Potion.moveSpeed).getAmplifier();
baseSpeed *= 1.0D + 0.2D * (double) (amplifier + 1);
}
if (mc.thePlayer.isPotionActive(Potion.jump)) {
gay2 += (double) ((float) (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1f);
lit -= (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.075;
baseSpeed -= 0.05 * (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1);
}
if (mc.thePlayer.motionY < gay2 * lit) {
mc.thePlayer.motionY = gay2;
}
if (mc.thePlayer.posY >= Math.round(mc.thePlayer.posY) - 0.0001 && mc.thePlayer.posY <= Math.round(mc.thePlayer.posY) + 0.0001) {
mc.thePlayer.motionY = 0;
}
}else {
double gay2 = 0.419999215712222222222531351325;
double lit = 0.42d;
if (mc.thePlayer.isPotionActive(Potion.jump)) {
gay2 += (double)((float)(mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1f);
lit -= (mc.thePlayer.getActivePotionEffect(Potion.jump).getAmplifier() + 1)*0.075;
}
if(mc.thePlayer.motionY <gay2*lit){
mc.thePlayer.motionY=gay2;
}
}
}
break;
case "jump":
if (mc.thePlayer.onGround && timer.hasTimePassed(jumpDelayValue.get())) {
fakeJump();
mc.thePlayer.motionY = jumpMotionValue.get();
timer.reset();
}
break;
case "motion":
if (mc.thePlayer.onGround) {
fakeJump();
mc.thePlayer.motionY = 0.42D;
} else if (mc.thePlayer.motionY < 0.1D) mc.thePlayer.motionY = -0.3D;
break;
case "motiontp":
if (mc.thePlayer.onGround) {
fakeJump();
mc.thePlayer.motionY = 0.42D;
} else if (mc.thePlayer.motionY < 0.23D)
mc.thePlayer.setPosition(mc.thePlayer.posX, (int) mc.thePlayer.posY, mc.thePlayer.posZ);
break;
case "packet":
if (mc.thePlayer.onGround && timer.hasTimePassed(2)) {
fakeJump();
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
mc.thePlayer.posY + 0.42D, mc.thePlayer.posZ, false));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX,
mc.thePlayer.posY + 0.753D, mc.thePlayer.posZ, false));
mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 1D, mc.thePlayer.posZ);
timer.reset();
}
break;
case "teleport":
if (teleportNoMotionValue.get())
mc.thePlayer.motionY = 0;
if ((mc.thePlayer.onGround || !teleportGroundValue.get()) && timer.hasTimePassed(teleportDelayValue.get())) {
fakeJump();
mc.thePlayer.setPositionAndUpdate(mc.thePlayer.posX, mc.thePlayer.posY + teleportHeightValue.get(), mc.thePlayer.posZ);
timer.reset();
}
break;
case "constantmotion":
if (mc.thePlayer.onGround) {
fakeJump();
jumpGround = mc.thePlayer.posY;
mc.thePlayer.motionY = constantMotionValue.get();
}
if (mc.thePlayer.posY > jumpGround + constantMotionJumpGroundValue.get()) {
fakeJump();
mc.thePlayer.setPosition(mc.thePlayer.posX, (int) mc.thePlayer.posY, mc.thePlayer.posZ);
mc.thePlayer.motionY = constantMotionValue.get();
jumpGround = mc.thePlayer.posY;
}
break;
case "aac3.3.9":
if (mc.thePlayer.onGround) {
fakeJump();
mc.thePlayer.motionY = 0.4001;
}
mc.timer.timerSpeed = 1F;
if (mc.thePlayer.motionY < 0) {
mc.thePlayer.motionY -= 0.00000945;
mc.timer.timerSpeed = 1.6F;
}
break;
}
}
/**
* Place target block
*/
private void place() {
if(placeInfo == null)
return;
// AutoBlock
int blockSlot = -1;
ItemStack itemStack = mc.thePlayer.getHeldItem();
if(mc.thePlayer.getHeldItem() == null || !(mc.thePlayer.getHeldItem().getItem() instanceof ItemBlock)) {
if(!autoBlockValue.get())
return;
blockSlot = InventoryUtils.findAutoBlockBlock();
if(blockSlot == -1)
return;
mc.getNetHandler().addToSendQueue(new C09PacketHeldItemChange(blockSlot - 36));
itemStack = mc.thePlayer.inventoryContainer.getSlot(blockSlot).getStack();
}
// Place block
if (mc.playerController.onPlayerRightClick(mc.thePlayer, mc.theWorld, itemStack, this.placeInfo.getBlockPos(),
placeInfo.getEnumFacing(), placeInfo.getVec3())) {
if(swingValue.get())
mc.thePlayer.swingItem();
else
mc.getNetHandler().addToSendQueue(new C0APacketAnimation());
}
this.placeInfo = null;
// Switch back to old slot when using auto block
if (!stayAutoBlock.get() && blockSlot >= 0)
mc.getNetHandler().addToSendQueue(new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem));
}
/**
* Search for placeable block
*
* @param blockPosition pos
* @return
*/
private boolean search(final BlockPos blockPosition) {
if (!BlockUtils.isReplaceable(blockPosition))
return false;
final Vec3 eyesPos = new Vec3(mc.thePlayer.posX, mc.thePlayer.getEntityBoundingBox().minY +
mc.thePlayer.getEyeHeight(), mc.thePlayer.posZ);
PlaceRotation placeRotation = null;
for (final EnumFacing side : EnumFacing.values()) {
final BlockPos neighbor = blockPosition.offset(side);
if (!BlockUtils.canBeClicked(neighbor))
continue;
final Vec3 dirVec = new Vec3(side.getDirectionVec());
for (double xSearch = 0.1D; xSearch < 0.9D; xSearch += 0.1D) {
for (double ySearch = 0.1D; ySearch < 0.9D; ySearch += 0.1D) {
for (double zSearch = 0.1D; zSearch < 0.9D; zSearch += 0.1D) {
final Vec3 posVec = new Vec3(blockPosition).addVector(xSearch, ySearch, zSearch);
final double distanceSqPosVec = eyesPos.squareDistanceTo(posVec);
final Vec3 hitVec = posVec.add(new Vec3(dirVec.xCoord * 0.5, dirVec.yCoord * 0.5, dirVec.zCoord * 0.5));
if ((eyesPos.squareDistanceTo(hitVec) > 18D ||
distanceSqPosVec > eyesPos.squareDistanceTo(posVec.add(dirVec)) ||
mc.theWorld.rayTraceBlocks(eyesPos, hitVec, false,
true, false) != null))
continue;
// face block
final double diffX = hitVec.xCoord - eyesPos.xCoord;
final double diffY = hitVec.yCoord - eyesPos.yCoord;
final double diffZ = hitVec.zCoord - eyesPos.zCoord;
final double diffXZ = MathHelper.sqrt_double(diffX * diffX + diffZ * diffZ);
final Rotation rotation = new Rotation(
MathHelper.wrapAngleTo180_float((float) Math.toDegrees(Math.atan2(diffZ, diffX)) - 90F),
MathHelper.wrapAngleTo180_float((float) -Math.toDegrees(Math.atan2(diffY, diffXZ)))
);
final Vec3 rotationVector = RotationUtils.getVectorForRotation(rotation);
final Vec3 vector = eyesPos.addVector(rotationVector.xCoord * 4, rotationVector.yCoord * 4, rotationVector.zCoord * 4);
final MovingObjectPosition obj = mc.theWorld.rayTraceBlocks(eyesPos, vector, false,
false, true);
if (!(obj.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && obj.getBlockPos().equals(neighbor)))
continue;
if (placeRotation == null || RotationUtils.getRotationDifference(rotation) <
RotationUtils.getRotationDifference(placeRotation.getRotation()))
placeRotation = new PlaceRotation(new PlaceInfo(neighbor, side.getOpposite(), hitVec), rotation);
}
}
}
}
if (placeRotation == null)
return false;
if (rotationsValue.get()) {
RotationUtils.setTargetRotation(placeRotation.getRotation(), 0);
lockRotation = placeRotation.getRotation();
}
placeInfo = placeRotation.getPlaceInfo();
return true;
}
@EventTarget
public void onPacket(final PacketEvent event) {
if(mc.thePlayer == null)
return;
final Packet<?> packet = event.getPacket();
if(packet instanceof C09PacketHeldItemChange) {
final C09PacketHeldItemChange packetHeldItemChange = (C09PacketHeldItemChange) packet;
slot = packetHeldItemChange.getSlotId();
}
}
/**
* Tower visuals
*
* @param event
*/
@EventTarget
public void onRender2D(final Render2DEvent event) {
if(counterDisplayValue.get()) {
GlStateManager.pushMatrix();
final String info = "Blocks: §7" + getBlocksAmount();
final ScaledResolution scaledResolution = new ScaledResolution(mc);
RenderUtils.drawBorderedRect((scaledResolution.getScaledWidth() / 2) - 2, (scaledResolution.getScaledHeight() / 2) + 5, (scaledResolution.getScaledWidth() / 2) + Fonts.font40.getStringWidth(info) + 2, (scaledResolution.getScaledHeight() / 2) + 16, 3, Color.BLACK.getRGB(), Color.BLACK.getRGB());
GlStateManager.resetColor();
Fonts.font40.drawString(info, scaledResolution.getScaledWidth() / 2, scaledResolution.getScaledHeight() / 2 + 7, Color.WHITE.getRGB());
GlStateManager.popMatrix();
}
}
@EventTarget
public void onJump(final JumpEvent event) {
if (onJumpValue.get())
event.cancelEvent();
}
/**
* @return hotbar blocks amount
*/
private int getBlocksAmount() {
int amount = 0;
for(int i = 36; i < 45; i++) {
final ItemStack itemStack = mc.thePlayer.inventoryContainer.getSlot(i).getStack();
if(itemStack != null && itemStack.getItem() instanceof ItemBlock)
amount += itemStack.stackSize;
}
return amount;
}
@Override
public String getTag() {
return modeValue.get();
}
}
// NOTE (AI): The swing branch sends C0A when the Swing setting is off instead of calling swingItem(), keeping the server-side swing while suppressing the local animation. The C09 slot switch and the C04 packet-mode ladder are this file's other packet faces.
anticheat Anti-Cheat Checks
The arm animation packet is an empty swing signal and the only per-click client input anticheats see reliably, which makes it the primitive of every autoclicker check in the corpus. Statistical checks sample the number of movement packets between swings and flag low-variance or excessive click rates (Frequency AutoClickerA, FlopAC AutoClickerA, Hydro's ArmAnimationCheck family). It is also the swing half of swing-break correlation checks (Grim NoSwingBreak) that catch nuker clients breaking blocks without swinging.
Classic low-deviation autoclicker check over the arm animation stream.
Samples the number of flying packets between WrappedPlayInArmAnimation packets, keeping a deque of 20 movement gaps. Samples are only accepted when CPS is above 6.5, fewer than 4 movements separate clicks, and the player is neither digging nor placing. When 20 samples accumulate it computes the standard deviation and outlier count; a deviation below 2 with fewer than 2 outliers fails the check.
// ===== FILE: ElevatedDev-Frequency, src/main/java/xyz/elevated/frequency/check/impl/autoclicker/AutoClickerA.java =====
package xyz.elevated.frequency.check.impl.autoclicker;
import com.google.common.collect.Lists;
import xyz.elevated.frequency.check.CheckData;
import xyz.elevated.frequency.check.type.PacketCheck;
import xyz.elevated.frequency.data.PlayerData;
import xyz.elevated.frequency.util.MathUtil;
import xyz.elevated.frequency.util.Pair;
import xyz.elevated.frequency.wrapper.impl.client.WrappedPlayInArmAnimation;
import xyz.elevated.frequency.wrapper.impl.client.WrappedPlayInFlying;
import java.util.Deque;
import java.util.List;
@CheckData(name = "AutoClicker (A)")
public final class AutoClickerA extends PacketCheck {
private int movements = 0;
private final Deque<Integer> samples = Lists.newLinkedList();
public AutoClickerA(final PlayerData playerData) {
super(playerData);
}
@Override
public void process(final Object object) {
if (object instanceof WrappedPlayInArmAnimation) {
final boolean valid = playerData.getCps().get() > 6.5
&& movements < 4 && !playerData.getActionManager().getDigging().get() && !playerData.getActionManager().getPlacing().get();
// If the movement are not incredibly low and the player isn't digging
if (valid) samples.add(movements);
if (samples.size() == 20) {
// Get the outliers properly from the math utility
final Pair<List<Double>, List<Double>> outlierPair = MathUtil.getOutliers(samples);
// Get the deviation from the math utility and the outliers
final double deviation = MathUtil.getStandardDeviation(samples);
final double outliers = outlierPair.getX().size() + outlierPair.getY().size();
// Low deviation and low outliers
if (deviation < 2.d && outliers < 2) fail();
// Clear the list
samples.clear();
}
// Reset the movements
movements = 0;
} else if (object instanceof WrappedPlayInFlying) {
++movements;
}
}
}
// NOTE (AI): Frequency AutoClickerA samples the movements between arm animation packets, requires a CPS above 6.5, and flags when 20 samples show a standard deviation below 2 with fewer than 2 outliers: the low-variance click pattern of an autoclicker.
Swing-break correlation: every block break must be accompanied by an arm animation.
Implements BlockBreakListener and PreViaPacketReceiveListener. It sets sentBreak on a non-cancelled break action, sets sentAnimation when the ANIMATION packet arrives, and on the next tick packet flags if a break was sent without an animation in between, then resets both flags.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/breaking/NoSwingBreak.java =====
package ac.grim.grimac.checks.impl.breaking;
import ac.grim.grimac.checks.Check;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.type.BlockBreakListener;
import ac.grim.grimac.checks.type.PreViaPacketReceiveListener;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.anticheat.update.BlockBreak;
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.protocol.player.DiggingAction;
@CheckData(name = "NoSwingBreak", stableKey = "grim.breaking.no_swing_break", description = "Did not swing while breaking block", experimental = true)
public class NoSwingBreak extends Check implements BlockBreakListener, PreViaPacketReceiveListener {
private boolean sentAnimation;
private boolean sentBreak;
public NoSwingBreak(GrimPlayer playerData) {
super(playerData);
}
@Override
public void onBlockBreak(BlockBreak blockBreak) {
if (blockBreak.action != DiggingAction.CANCELLED_DIGGING) {
sentBreak = true;
}
}
@Override
public void onPreViaPacketReceive(PacketReceiveEvent event) {
if (event.getPacketType() == PacketType.Play.Client.ANIMATION) {
sentAnimation = true;
}
if (isTickPacket(event.getPacketType())) {
if (sentBreak && !sentAnimation) {
flag();
}
sentAnimation = sentBreak = false;
}
}
}
// NOTE (AI): NoSwingBreak correlates the ANIMATION packet with the digging packet: if a break was sent but no arm animation arrived before the next tick packet, the check flags. It listens to the animation packet directly as a PreViaPacketReceiveListener.
The shared base class of Hydro's whole autoclicker family: it converts the animation stream into click samples and CPS for per-check handlers.
On each ANIMATION packet, if the action tracker is not digging, it records the movement gap into a click sample queue, applying filters for combat-only checks (last attack within a minute), double-click variants, and the zero-movement case. At the configured sample size it computes CPS via MathUtil and delegates to the abstract handle method, then clears the queue. Flying packets increment the movement counter.
// ===== FILE: Incognitolol-Hydro, src/main/java/integral/studios/hydro/model/check/type/ArmAnimationCheck.java =====
package integral.studios.hydro.model.check.type;
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import integral.studios.hydro.model.check.violation.category.Category;
import integral.studios.hydro.model.check.violation.category.SubCategory;
import integral.studios.hydro.model.check.violation.handler.ViolationHandler;
import integral.studios.hydro.model.PlayerData;
import integral.studios.hydro.util.math.MathUtil;
import integral.studios.hydro.util.packet.PacketUtil;
import java.util.LinkedList;
import java.util.Queue;
public abstract class ArmAnimationCheck extends PacketCheck {
private final Queue<Integer> clickSamples = new LinkedList<>();
private static final int MAX_COMBAT_TICKS = 20 * 60; // 1 minute
private final boolean combatCheck, doubleClicks;
private final int maxClickSamples, maxMovements;
private int movements;
public ArmAnimationCheck(PlayerData playerData, String name, String desc, ViolationHandler violationHandler, boolean combatCheck, boolean doubleClicks, int maxSamples, int maxMovements) {
super(playerData, name, desc, violationHandler, Category.COMBAT, SubCategory.AUTO_CLICKER);
this.combatCheck = combatCheck;
this.doubleClicks = doubleClicks;
this.maxClickSamples = maxSamples;
this.maxMovements = maxMovements;
}
@Override
public void handle(PacketReceiveEvent event) {
if (event.getPacketType() == PacketType.Play.Client.ANIMATION && !actionTracker.isDigging()) {
if (movements < maxMovements) {
if (combatCheck && actionTracker.getLastAttack() > MAX_COMBAT_TICKS) {
return;
}
if (!doubleClicks && movements == 0) {
return;
}
if (clickSamples.add(movements) && clickSamples.size() == maxClickSamples) {
double cps = MathUtil.getCPS(clickSamples);
handle(clickSamples, cps);
clickSamples.clear();
}
}
movements = 0;
} else if (PacketUtil.isFlying(event.getPacketType())) {
++movements;
}
}
public abstract void handle(Queue<Integer> clickSamples, double cps);
}
// NOTE (AI): Hydro's ArmAnimationCheck is the base class of the whole autoclicker family: it collects movement-gap samples per ANIMATION packet, converts them to CPS, and delegates to per-check handlers (AutoClickerA, AutoClickerB, AutoClickerC and the double-click variants).
CPS ceiling check: sustained clicking above 20 clicks per second is an autoclicker.
Counts movements between ARM_ANIMATION packets into a delay list when fewer than 10 movements separate them. At 30 samples it converts the delays to CPS via MathUtil and flags when CPS exceeds 20, then clears the list. The sample resets while the player is digging, holding a block or sword, or for the first 60 ticks after join, keeping the check on combat clicks.
// ===== FILE: JTXOfficial-FlopAC, src/main/java/me/jtx/flopac/checks/combat/autoclicker/AutoClickerA.java =====
package me.jtx.flopac.checks.combat.autoclicker;
import me.jtx.flopac.base.check.api.Check;
import me.jtx.flopac.base.check.api.CheckInformation;
import me.jtx.flopac.base.event.PacketEvent;
import me.jtx.flopac.base.user.User;
import me.jtx.flopac.tinyprotocol.api.Packet;
import me.jtx.flopac.tinyprotocol.packet.in.WrappedInBlockPlacePacket;
import me.jtx.flopac.util.MathUtil;
import org.bukkit.Material;
import java.util.ArrayList;
import java.util.List;
@CheckInformation(checkName = "AutoClicker", lagBack = false, description = "Checks if the player is clicking over 22 clicks per second.")
public class AutoClickerA extends Check {
private int movements;
private List<Integer> delays = new ArrayList<>();
private int blockTicks;
@Override
public void onPacket(PacketEvent event) {
User user = event.getUser();
switch (event.getType()) {
case Packet.Client.FLYING:
case Packet.Client.LOOK:
case Packet.Client.POSITION_LOOK:
case Packet.Client.POSITION: {
if (user.shouldCancel()
|| user.getMovementProcessor().getLastBlockDigTimer().hasNotPassed(20)
|| blockTicks > 0
|| user.getTick() < 60) {
movements = 0;
delays.clear();
return;
}
movements++;
break;
}
case Packet.Client.ARM_ANIMATION: {
if (movements < 10) {
delays.add(movements);
double cps = MathUtil.getCPS(delays);
if (Double.valueOf(cps).isInfinite()) {
delays.clear();
return;
}
if (delays.size() > 30) {
if (cps > 20) {
flag(user, "Clicking Fast", "CPS: "+cps);
}
delays.clear();
}
}
movements = 0;
break;
}
case Packet.Client.BLOCK_PLACE: {
WrappedInBlockPlacePacket blockP = new WrappedInBlockPlacePacket(event.getPacket(), user.getPlayer());
if (blockP.getItemStack().getType().isBlock()
|| blockP.getItemStack().getType() == Material.DIAMOND_SWORD
|| blockP.getItemStack().getType() == Material.GOLD_SWORD
|| blockP.getItemStack().getType() == Material.IRON_SWORD
|| blockP.getItemStack().getType() == Material.STONE_SWORD
|| blockP.getItemStack().getType() == Material.WOOD_SWORD) {
blockTicks++;
} else {
blockTicks = 0;
}
break;
}
}
}
}
// NOTE (AI): FlopAC AutoClickerA counts movements between ARM_ANIMATION packets and flags sustained CPS above 20, exempting players who are digging or holding a block/sword, which keeps the check on combat clicks.
Related Packets
Wiki Cross-Reference
Zero payload in 1.8.9: read and write are no-ops, so the wire cost is just the 0x0A id.
Server marks the player active, plays the swing and broadcasts S0B to trackers.
Client fires once per swing cycle under the swing-in-progress guard; attack itself is a separate C02.
MCP 1.8.9 C0APacketAnimation implements Packet
1.8.9 callers: EntityPlayerSP.swingItem sends new C0APacketAnimation (line 307): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/client/entity/EntityPlayerSP.java
Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.
Vanilla Internals
Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.
Module Analyses Using C0APacketAnimation
Full source walkthroughs of the modules and anti-cheats that use this packet.