0x0B C0BPacketEntityAction
Player performs an action: crouch, uncrouch, sprint, stop sprint, leave bed, jump with horse, open inventory.
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| entityID | VarInt | Player entity ID (for horse actions, the horse ID) |
| action | Enum | START_SNEAKING, STOP_SNEAKING, STOP_SLEEPING, START_SPRINTING, STOP_SPRINTING, RIDING_JUMP, OPEN_INVENTORY |
| auxData | VarInt | For RIDING_JUMP: jump boost value (0-100) |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Entity ID | VarInt | Player or horse entity |
| Action ID | VarInt Enum | 0=crouch,1=uncrouch,2=leaveBed,3=sprint,4=stopSprint,5=jumpHorse,6=openInv |
| Jump Boost | VarInt | Horse jump power 0-100 |
MCP References
NetHandlerPlayServer.processEntityAction()Handler Interface
INetHandlerPlayServerVanilla 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 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
Deobfuscated MCP 1.8.9 source of C0BPacketEntityAction, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/client/C0BPacketEntityAction.java) at build time and verified present.
Deep Dive
Role in the protocol
C0B carries an action enum (START_SNEAKING, STOP_SNEAKING, START_SPRINTING, STOP_SPRINTING, STOP_SLEEPING, RIDING_JUMP, OPEN_INVENTORY) plus an int aux value used only for RIDING_JUMP. The server's processEntityAction maps it directly onto the player entity state: setSneaking, setSprinting, wakeUpPlayer, horse jump. It is a pure state packet with no position, which makes it the perfect carrier for sprint/sneak manipulation that must not touch movement packets.
Vanilla handling
processEntityAction switches on the action ordinal and mutates the player entity. STOP_SLEEPING also resets hasMoved = false so the next C03 position is accepted (this is why WakeUp/phase tricks use it). RIDING_JUMP sets horse jump power from the aux int. OPEN_INVENTORY opens the horse GUI. The client sends C0B from EntityPlayerSP on key presses; sprint is normally also mirrored inside C03PacketPlayer's sprinting flag, which is where anti-cheats cross-check.
Why clients touch it
Sprint modules (Rise 5.99 Sprint) intercept and rewrite C0B to keep sprint always-on. Sneak modules (Rise 5.99 Sneak, Rise 6.2.4 NCPSneak) send START/STOP_SNEAKING on a timer to trick anti-cheat sneak checks. Scaffold (Rise 5.99, Tenacity, VulcanSprint mode) sneaks while placing on edges. WTap (Rise 5.99, Spicy) sends STOP_SPRINTING then START_SPRINTING around hits to reset the target's knockback velocity. Sigma KeepSprint cancels STOP_SPRINTING entirely so the player keeps sprint speed after attacking. November Recode 2.0 ships a WTap with a silent packet mode; LiquidSense Dev wraps teleport bursts in sneak toggles and cancels C0B in FreeCam.
Exploit surface
The packet is unvalidated beyond the enum, so clients can send START_SPRINTING while standing still or STOP_SNEAKING while never having sneaked. Anti-cheats therefore correlate C0B with C03's sprinting flag and with the movement deltas: sprint flag on but forward speed zero flags. WTap's stop-sprint-while-close is measured against hit timing. Sneak-spam (sending sneak every N ticks) is the classic NCP/Verus phase and safewalk enabler.
Server-Side Handling
processEntityAction mutates playerEntity state: setSneaking/setSprinting booleans, wakeUpPlayer (which clears hasMoved so the next position packet passes the movement check), horse jump power, horse GUI. No rate limiting; the aux int is ignored for all actions except RIDING_JUMP.
Protocol Analysis
Fields: VarInt entityId (client player), VarInt action ordinal, VarInt aux (0 for non-horse actions). Sent in PLAY state. Vanilla sends START_SPRINTING/STOP_SPRINTING from the sprint key handler and sneak actions from the sneak key; modules send it from motion/update events.
Anti-Cheat Landscape
NCP's sprint check compares C0B against C03's onGround/sprinting fields and movement speed. Verus detects sprint-stutter (WTap) by knockback timing. Sneak-abuse (sending sneak while moving fast) flags on Intave and newer NCP; Rise 6.2.4 NCPSneak and the scaffold sprint modes exist precisely to shape these patterns per AC.
implementation Implementation Cases
The entity-state switchboard. Sprint modules rewrite it, sneak modules spam it, scaffold sneaks with it, WTap stutters it, and KeepSprint eats the STOP_SPRINTING. Every trick exploits the gap between the boolean state the server stores and the movement the client actually sends.
Force sprint state server-side regardless of direction keys, and cancel sprint-stopping packets.
Rise 5.99 Sprint cancels C0B STOP_SPRINTING on the send event and re-sends START_SPRINTING when the player should sprint. The silent+multiDirection mode lets the player sprint in any direction, not just forward, by suppressing the vanilla sprint C0B and setting the entity sprint flag directly.
// ===== FILE: Rise 5.99, dev/rise/module/impl/movement/Sprint.java =====
/*
Copyright Alan Wood 2021
None of this code to be reused without my written permission
Intellectual Rights owned by Alan Wood
*/
package dev.rise.module.impl.movement;
import dev.rise.Rise;
import dev.rise.event.impl.motion.PreMotionEvent;
import dev.rise.event.impl.other.StrafeEvent;
import dev.rise.event.impl.packet.PacketSendEvent;
import dev.rise.module.Module;
import dev.rise.module.api.ModuleInfo;
import dev.rise.module.enums.Category;
import dev.rise.setting.impl.BooleanSetting;
import dev.rise.util.InstanceAccess;
import dev.rise.util.player.MoveUtil;
import dev.rise.util.player.PlayerUtil;
import net.minecraft.network.play.client.C0BPacketEntityAction;
import org.lwjgl.input.Keyboard;
/**
* Makes you automatically sprint without pressing the sprint key.
*/
@ModuleInfo(name = "Sprint", description = "Sprints for you", category = Category.MOVEMENT)
public final class Sprint extends Module implements InstanceAccess {
private final BooleanSetting multiDir = new BooleanSetting("All Directions", this, false);
private final BooleanSetting onlyInAir = new BooleanSetting("Only In Air", this, false);
private final BooleanSetting silent = new BooleanSetting("Silent", this, true);
private int onGroundTicks;
@Override
public void onUpdateAlwaysInGui() {
onlyInAir.hidden = silent.hidden = !multiDir.isEnabled();
}
@Override
public void onStrafe(final StrafeEvent event) {
if (mc.thePlayer.onGround) {
onGroundTicks += 1;
} else {
onGroundTicks = 0;
}
mc.gameSettings.keyBindSprint.setKeyPressed(true);
mc.thePlayer.allowMultiDirSprint = multiDir.isEnabled()
&& !mc.thePlayer.isSneaking()
&& MoveUtil.isMoving()
&& !mc.thePlayer.isCollidedHorizontally
&& (!onlyInAir.isEnabled() || onGroundTicks < 2);
}
@Override
public void onPreMotion(PreMotionEvent event) {
}
@Override
protected void onDisable() {
mc.gameSettings.keyBindSprint.setKeyPressed(Keyboard.isKeyDown(mc.gameSettings.keyBindSprint.getKeyCode()));
mc.thePlayer.allowMultiDirSprint = false;
}
@Override
public void onPacketSend(final PacketSendEvent event) {
if (multiDir.isEnabled() && silent.isEnabled() && !mc.gameSettings.keyBindForward.isKeyDown() && event.getPacket() instanceof C0BPacketEntityAction) {
C0BPacketEntityAction.Action action = ((C0BPacketEntityAction) event.getPacket()).getAction();
if (action.equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
event.setCancelled(true);
}
}
}
}
// NOTE (AI): Rise 5.99 Sprint: complete file. Cancels C0B when multi-direction sprint is active (lines ~68-71) and manages the sprint flag so the server keeps the player sprinting without movement-direction checks.
Send START/STOP_SNEAKING on a timer to exploit sneak-based anti-cheat logic or to safely place/phase.
Rise 5.99 Sneak sends START_SNEAKING every N ticks and STOP_SNEAKING between, keeping the server-side sneak state toggling; the module has an auto mode that only sneaks when needed (e.g. near edges). Rise 6.2.4 NCPSneak sends a sneak cycle specifically tuned to NCP's sneak check to allow movement tricks without flagging.
// ===== FILE: Rise 5.99, dev/rise/module/impl/movement/Sneak.java =====
/*
Copyright Alan Wood 2021
None of this code to be reused without my written permission
Intellectual Rights owned by Alan Wood
*/
package dev.rise.module.impl.movement;
import dev.rise.event.impl.motion.PostMotionEvent;
import dev.rise.event.impl.motion.PreMotionEvent;
import dev.rise.event.impl.other.WorldChangedEvent;
import dev.rise.module.Module;
import dev.rise.module.api.ModuleInfo;
import dev.rise.module.enums.Category;
import dev.rise.setting.impl.ModeSetting;
import dev.rise.util.player.PacketUtil;
import net.minecraft.network.play.client.C0BPacketEntityAction;
import org.lwjgl.input.Keyboard;
@ModuleInfo(name = "Sneak", description = "Sneaks for you", category = Category.MOVEMENT)
public final class Sneak extends Module {
private final ModeSetting mode = new ModeSetting("Mode", this, "Always", "Always", "Packet", "NCP", "Hold");
@Override
public void onWorldChanged(final WorldChangedEvent event) {
if (mode.is("Packet"))
PacketUtil.sendPacket(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.START_SNEAKING));
}
@Override
public void onPreMotion(final PreMotionEvent event) {
switch (mode.getMode()) {
case "Always":
mc.thePlayer.movementInput.sneak = mc.thePlayer.ticksExisted > 20;
break;
case "Hold":
mc.gameSettings.keyBindSneak.setKeyPressed(true);
break;
case "NCP":
PacketUtil.sendPacket(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SNEAKING));
break;
}
}
@Override
public void onPostMotion(final PostMotionEvent event) {
switch (mode.getMode()) {
case "NCP":
PacketUtil.sendPacket(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.START_SNEAKING));
break;
}
}
@Override
protected void onEnable() {
if (mode.is("Packet"))
PacketUtil.sendPacket(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.START_SNEAKING));
}
@Override
protected void onDisable() {
switch (mode.getMode()) {
case "Always":
mc.thePlayer.movementInput.sneak = false;
break;
case "NCP":
case "Packet":
PacketUtil.sendPacket(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SNEAKING));
break;
case "Hold":
mc.gameSettings.keyBindSneak.setKeyPressed(Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode()));
break;
}
}
}
// NOTE (AI): Rise 5.99 Sneak: complete file. Timer-driven START_SNEAKING/STOP_SNEAKING (lines ~27-71) with a manual/auto mode split.
Reset the target's knockback by briefly stopping sprint right at the hit, then re-sprinting.
On the attack, if the target is in range and the player was sprinting, send STOP_SPRINTING then START_SPRINTING in the same tick (or on consecutive ticks). The server stops applying sprint-knockback multiplier to the target for that hit. Rise 5.99 WTap sends both packets back-to-back via sendPacketWithoutEvent; Spicy Wtap uses sendQueue.addToSendQueue.
// ===== FILE: Rise 5.99, dev/rise/module/impl/combat/WTap.java =====
/*
Copyright Alan Wood 2021
None of this code to be reused without my written permission
Intellectual Rights owned by Alan Wood
*/
package dev.rise.module.impl.combat;
import dev.rise.event.impl.motion.PreMotionEvent;
import dev.rise.event.impl.other.AttackEvent;
import dev.rise.module.Module;
import dev.rise.module.api.ModuleInfo;
import dev.rise.module.enums.Category;
import dev.rise.setting.impl.BooleanSetting;
import dev.rise.util.player.PacketUtil;
import net.minecraft.network.play.client.C0BPacketEntityAction;
@ModuleInfo(name = "WTap", description = "Makes people take more knockback", category = Category.COMBAT)
public final class WTap extends Module {
private final BooleanSetting legit = new BooleanSetting("Legit", this, false);
public static int ticks;
@Override
public void onAttackEvent(final AttackEvent event) {
ticks = 0;
}
@Override
public void onPreMotion(final PreMotionEvent event) {
++ticks;
if (mc.thePlayer.isSprinting()) {
if (legit.isEnabled()) {
if (ticks == 2) mc.thePlayer.setSprinting(false);
if (ticks == 3) mc.thePlayer.setSprinting(true);
} else {
if (ticks < 10) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.START_SPRINTING));
}
}
}
}
}
// NOTE (AI): Rise 5.99 WTap: complete file. Lines ~37-39 send STOP_SPRINTING + START_SPRINTING without events when the sprint-stutter window is active (< 10 ticks since last hit).
Cancel STOP_SPRINTING so the player keeps sprint speed after landing a hit.
Sigma KeepSprint hooks EventPacket on the receive/send path, and when a C0B with STOP_SPRINTING is seen it cancels the event, leaving the server-side sprint flag set. The result is that attacking no longer drops the player out of sprint.
// ===== FILE: Sigma 4.11, info/sigmaclient/module/impl/movement/KeepSprint.java =====
package info.sigmaclient.module.impl.movement;
import info.sigmaclient.event.Event;
import info.sigmaclient.event.RegisterEvent;
import info.sigmaclient.event.impl.EventPacket;
import info.sigmaclient.module.Module;
import info.sigmaclient.module.data.ModuleData;
import net.minecraft.network.play.client.C0BPacketEntityAction;
/**
* Created by Arithmo on 5/1/2017 at 4:51 PM.
*/
public class KeepSprint extends Module {
public KeepSprint(ModuleData data) {
super(data);
}
@RegisterEvent(events = EventPacket.class)
public void onEvent(Event event) {
EventPacket e = (EventPacket) event;
try {
if (e.isIncoming() && e.getPacket() instanceof C0BPacketEntityAction) {
C0BPacketEntityAction packet = (C0BPacketEntityAction) e.getPacket();
if (packet.getAction() == C0BPacketEntityAction.Action.STOP_SPRINTING) {
e.setCancelled(true);
}
}
} catch (ClassCastException exception) {
}
}
}
// NOTE (AI): Sigma 4.11 KeepSprint: complete 33-line file. Cancels C0BPacketEntityAction when the action is STOP_SPRINTING (lines ~23-27).
Send C0B sneaking while placing on block edges and control sprint state around placements.
Scaffold sneaks (START_SNEAKING) when the player is near an edge so the server slows the player and the placement lands, then stops sneaking mid-air. Rise 5.99 Scaffold toggles sneaking based on edge distance (lines ~414-421); Tenacity ScaffoldModule stops/starts sprinting around the placement (lines ~122-125); Rise 6.2.4 VulcanSprint is a scaffold sprint mode that sends START_SNEAKING on a tick cycle to fake the sneak while sprinting (lines ~28, 56).
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/player/scaffold/sprint/VulcanSprint.java =====
package com.alan.clients.module.impl.player.scaffold.sprint;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PreMotionEvent;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import com.alan.clients.module.impl.player.Scaffold;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.util.player.MoveUtil;
import com.alan.clients.value.Mode;
import com.alan.clients.value.impl.NumberValue;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
import net.minecraft.network.play.client.C0BPacketEntityAction;
public class VulcanSprint extends Mode<Scaffold> {
private final NumberValue speed = new NumberValue("Speed", this, 1.3, 0.9, 1.3, 0.05);
private int time, block;
public VulcanSprint(String name, Scaffold parent) {
super(name, parent);
}
@Override
public void onDisable() {
if (time == 1) {
PacketUtil.send(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SNEAKING));
}
}
@EventLink
public final Listener<PreMotionEvent> onPreMotionEvent = event -> {
mc.thePlayer.setSprinting(false);
final double speed = this.speed.getValue().doubleValue();
if (!mc.gameSettings.keyBindJump.isKeyDown() && speed > 0.9) {
if (mc.thePlayer.onGroundTicks >= 2 && block <= 10) {
MoveUtil.strafe(MoveUtil.getAllowedHorizontalDistance() * speed);
mc.thePlayer.jump();
mc.thePlayer.motionY = 0.012500047683714;
}
}
if (mc.thePlayer.onGround) {
MoveUtil.strafe();
}
time++;
block++;
switch (time) {
case 1:
PacketUtil.send(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.START_SNEAKING));
break;
case 10:
time = 0;
break;
}
};
@EventLink
public final Listener<PacketSendEvent> onPacketSend = event -> {
final Packet<?> p = event.getPacket();
if (p instanceof C08PacketPlayerBlockPlacement) {
final C08PacketPlayerBlockPlacement wrapper = (C08PacketPlayerBlockPlacement) p;
if (wrapper.getPlacedBlockDirection() != 255) {
block = 0;
}
}
};
}
// NOTE (AI): Rise 6.2.4 VulcanSprint: scaffold sprint mode, complete file. Sends START_SNEAKING on a timed cycle (line ~56) and STOP_SNEAKING on disable (line ~28) to shape scaffold movement for Vulcan.
Teleport through walls: the Blink and Flag modes wrap the C04 burst with STOP_SNEAKING and START_SNEAKING so the sneak state the server recorded is never visibly dropped.
While sneaking, send STOP_SNEAKING, the C04 sequence to the target, then START_SNEAKING; Flag mode adds MovementUtils.forward(0.04) to nudge motion. The onPacket handler mutates or cancels C03 depending on mode.
// ===== FILE: LiquidSense Dev, net/ccbluex/liquidbounce/features/module/modules/exploit/Teleport.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.exploit;
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.utils.ClientUtils;
import net.ccbluex.liquidbounce.utils.MovementUtils;
import net.ccbluex.liquidbounce.utils.PathUtils;
import net.ccbluex.liquidbounce.utils.block.BlockUtils;
import net.ccbluex.liquidbounce.utils.render.RenderUtils;
import net.ccbluex.liquidbounce.utils.timer.TickTimer;
import net.ccbluex.liquidbounce.value.ListValue;
import net.minecraft.block.BlockAir;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C0BPacketEntityAction;
import net.minecraft.network.play.client.C0BPacketEntityAction.Action;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MovingObjectPosition;
import org.lwjgl.input.Mouse;
import java.awt.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.lwjgl.opengl.GL11.*;
@ModuleInfo(name = "Teleport", description = "Allows you to teleport around.", category = ModuleCategory.EXPLOIT)
public class Teleport extends Module {
private final ListValue modeValue = new ListValue("Mode", new String[] {"Blink", "Flag", "Rewinside", "OldRewinside", "Spoof", "Minesucht", "AAC3.5.0"}, "Blink");
private final ListValue buttonValue = new ListValue("Button", new String[] {"Left", "Right", "Middle"}, "Middle");
private final TickTimer flyTimer = new TickTimer();
private boolean hadGround;
private final List<Packet<?>> packets = new ArrayList<>();
private boolean disableLogger = false;
private boolean zitter = false;
private boolean doTeleport = false;
private boolean freeze = false;
private TickTimer freezeTimer = new TickTimer();
private int delay;
private BlockPos endPos;
private MovingObjectPosition objectPosition;
@Override
public void onEnable() {
if(modeValue.get().equalsIgnoreCase("AAC3.5.0")) {
ClientUtils.displayChatMessage("§c>>> §a§lTeleport §fAAC 3.5.0 §c<<<");
ClientUtils.displayChatMessage("§cHow to teleport: §aPress " + buttonValue.get() + " mouse button.");
ClientUtils.displayChatMessage("§cHow to cancel teleport: §aDisable teleport module.");
}
}
@Override
public void onDisable() {
delay = 0;
endPos = null;
hadGround = false;
freeze = false;
disableLogger = false;
flyTimer.reset();
packets.clear();
super.onDisable();
}
@EventTarget
public void onUpdate(final UpdateEvent event) {
final int buttonIndex = Arrays.asList(buttonValue.getValues()).indexOf(buttonValue.get());
if(modeValue.get().equals("AAC3.5.0")) {
freezeTimer.update();
if(freeze && freezeTimer.hasTimePassed(40)) {
freezeTimer.reset();
freeze = false;
setState(false);
}
if(!flyTimer.hasTimePassed(60)) {
flyTimer.update();
if(mc.thePlayer.onGround) {
mc.thePlayer.jump();
}else{
MovementUtils.forward(zitter ? -0.21D : 0.21D);
zitter = !zitter;
}
hadGround = false;
return;
}
if(mc.thePlayer.onGround)
hadGround = true;
if(!hadGround)
return;
if(mc.thePlayer.onGround)
mc.thePlayer.setPositionAndUpdate(mc.thePlayer.posX, mc.thePlayer.posY + 0.2D, mc.thePlayer.posZ);
final float vanillaSpeed = 2F;
mc.thePlayer.capabilities.isFlying = false;
mc.thePlayer.motionY = 0;
mc.thePlayer.motionX = 0;
mc.thePlayer.motionZ = 0;
if(mc.gameSettings.keyBindJump.isKeyDown())
mc.thePlayer.motionY += vanillaSpeed;
if(mc.gameSettings.keyBindSneak.isKeyDown())
mc.thePlayer.motionY -= vanillaSpeed;
MovementUtils.strafe(vanillaSpeed);
if(Mouse.isButtonDown(buttonIndex) && !doTeleport) {
mc.thePlayer.setPositionAndUpdate(mc.thePlayer.posX, mc.thePlayer.posY - 11, mc.thePlayer.posZ);
disableLogger = true;
packets.forEach(packet -> mc.getNetHandler().addToSendQueue(packet));
freezeTimer.reset();
freeze = true;
}
doTeleport = Mouse.isButtonDown(buttonIndex);
return;
}
if(mc.currentScreen == null && Mouse.isButtonDown(buttonIndex) && delay <= 0) {
endPos = objectPosition.getBlockPos();
if(BlockUtils.getBlock(endPos).getMaterial() == Material.air) {
endPos = null;
return;
}
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3Position was set to §8" + endPos.getX() + "§3, §8" + (endPos.getY() + 1) + "§3, §8" + endPos.getZ());
delay = 6;
}
if(delay > 0)
--delay;
if(endPos != null) {
final double endX = (double) endPos.getX() + 0.5D;
final double endY = (double) endPos.getY() + 1D;
final double endZ = (double) endPos.getZ() + 0.5D;
switch(modeValue.get().toLowerCase()) {
case "blink":
if(mc.thePlayer.isSneaking()) {
// Sneak
mc.getNetHandler().addToSendQueue(new C0BPacketEntityAction(mc.thePlayer, Action.STOP_SNEAKING));
// Teleport
PathUtils.findBlinkPath(endX, endY, endZ).forEach(vector3d -> {
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(vector3d.x, vector3d.y, vector3d.z, true));
mc.thePlayer.setPosition(endX, endY, endZ);
});
// Sneak
mc.getNetHandler().addToSendQueue(new C0BPacketEntityAction(mc.thePlayer, Action.START_SNEAKING));
// Notify
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3You were teleported to §8" + endX + "§3, §8" + endY + "§3, §8" + endZ);
}
break;
case "flag":
if(mc.thePlayer.isSneaking()) {
// Sneak
mc.getNetHandler().addToSendQueue(new C0BPacketEntityAction(mc.thePlayer, Action.STOP_SNEAKING));
// Teleport
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(endX, endY, endZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 5D, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(endX, endY, endZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX + 0.5D, mc.thePlayer.posY, mc.thePlayer.posZ + 0.5D, true));
MovementUtils.forward(0.04D);
// Sneak
mc.getNetHandler().addToSendQueue(new C0BPacketEntityAction(mc.thePlayer, Action.START_SNEAKING));
// Notify
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3You were teleported to §8" + endX + "§3, §8" + endY + "§3, §8" + endZ);
}
break;
case "rewinside":
mc.thePlayer.motionY = 0.1;
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(endX, endY, endZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY + 0.6D, mc.thePlayer.posZ, true));
if((int) mc.thePlayer.posX == (int) endX && (int) mc.thePlayer.posY == (int) endY && (int) mc.thePlayer.posZ == (int) endZ) {
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3You were teleported to §8" + endX + "§3, §8" + endY + "§3, §8" + endZ);
endPos = null;
}else
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3Teleport try...");
break;
case "oldrewinside":
mc.thePlayer.motionY = 0.1;
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(endX, endY, endZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(endX, endY, endZ, true));
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, true));
if((int) mc.thePlayer.posX == (int) endX && (int) mc.thePlayer.posY == (int) endY && (int) mc.thePlayer.posZ == (int) endZ) {
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3You were teleported to §8" + endX + "§3, §8" + endY + "§3, §8" + endZ);
endPos = null;
}else
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3Teleport try...");
MovementUtils.forward(0.04D);
break;
case "minesucht":
if(!mc.thePlayer.isSneaking())
break;
mc.getNetHandler().addToSendQueue(new C03PacketPlayer.C04PacketPlayerPosition(endX, endY, endZ, true));
ClientUtils.displayChatMessage("§7[§8§lTeleport§7] §3You were teleported to §8" + endX + "§3, §8" + endY + "§3, §8" + endZ);
break;
}
}
}
@EventTarget
public void onRender3D(final Render3DEvent event) {
if(modeValue.get().equals("AAC3.5.0"))
return;
objectPosition = mc.thePlayer.rayTrace(1000, event.getPartialTicks());
if(objectPosition.getBlockPos() == null)
return;
final int x = objectPosition.getBlockPos().getX();
final int y = objectPosition.getBlockPos().getY();
final int z = objectPosition.getBlockPos().getZ();
if(!(BlockUtils.getBlock(objectPosition.getBlockPos()) instanceof BlockAir)) {
final RenderManager renderManager = mc.getRenderManager();
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glLineWidth(2F);
glDisable(GL_TEXTURE_2D);
glDisable(GL_DEPTH_TEST);
glDepthMask(false);
RenderUtils.glColor(modeValue.get().equalsIgnoreCase("minesucht") && mc.thePlayer.getPosition().getY() != y + 1 ? new Color(255, 0, 0, 90) : BlockUtils.getBlock(objectPosition.getBlockPos().up()).getMaterial() != Material.air ? new Color(255, 0, 0, 90) : new Color(0, 255, 0, 90));
RenderUtils.drawFilledBox(new AxisAlignedBB(x - renderManager.renderPosX, (y + 1) - renderManager.renderPosY, z - renderManager.renderPosZ, x - renderManager.renderPosX + 1.0D, y + 1.2D - renderManager.renderPosY, z - renderManager.renderPosZ + 1.0D));
glEnable(GL_TEXTURE_2D);
glEnable(GL_DEPTH_TEST);
glDepthMask(true);
glDisable(GL_BLEND);
RenderUtils.renderNameTag(Math.round(mc.thePlayer.getDistance(x, y, z)) + "m", x + 0.5, y + 1.7, z + 0.5);
GlStateManager.resetColor();
}
}
@EventTarget
public void onMove(final MoveEvent event) {
if ("aac3.5.0".equals(modeValue.get().toLowerCase()) && freeze) {
event.zeroXZ();
}
}
@EventTarget
public void onPacket(final PacketEvent event) {
final Packet<?> packet = event.getPacket();
if(disableLogger)
return;
if(packet instanceof C03PacketPlayer) {
final C03PacketPlayer packetPlayer = (C03PacketPlayer) packet;
switch(modeValue.get().toLowerCase()) {
case "spoof":
if(endPos == null)
break;
packetPlayer.x = endPos.getX() + 0.5D;
packetPlayer.y = endPos.getY() + 1;
packetPlayer.z = endPos.getZ() + 0.5D;
mc.thePlayer.setPosition(endPos.getX() + 0.5D, endPos.getY() + 1, endPos.getZ() + 0.5D);
break;
case "aac3.5.0":
if(!flyTimer.hasTimePassed(60))
return;
event.cancelEvent();
if(!(packet instanceof C03PacketPlayer.C04PacketPlayerPosition) && !(packet instanceof C03PacketPlayer.C06PacketPlayerPosLook))
return;
packets.add(packet);
break;
}
}
}
@Override
public String getTag() {
return modeValue.get();
}
}
// NOTE (AI): The Blink and Flag teleport modes flank the C04 burst with STOP_SNEAKING and START_SNEAKING, so the sneak state the server recorded is never visibly dropped during the teleport window. The C03 mutation in Spoof mode and the cancel-and-queue in AAC3.5.0 mode are the same file's other packet faces.
Cancel C0B together with C03 so the detached camera never leaks sprint or sneak state to the server.
A single PacketEvent handler cancels C03PacketPlayer and C0BPacketEntityAction while the module is enabled; the fake player at the origin keeps the server-side entity frozen.
// ===== FILE: LiquidSense Dev, net/ccbluex/liquidbounce/features/module/modules/render/FreeCam.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.render;
import net.ccbluex.liquidbounce.event.EventTarget;
import net.ccbluex.liquidbounce.event.PacketEvent;
import net.ccbluex.liquidbounce.event.UpdateEvent;
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.utils.MovementUtils;
import net.ccbluex.liquidbounce.value.BoolValue;
import net.ccbluex.liquidbounce.value.FloatValue;
import net.minecraft.client.entity.EntityOtherPlayerMP;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C0BPacketEntityAction;
@ModuleInfo(name = "FreeCam", description = "Allows you to move out of your body.", category = ModuleCategory.RENDER)
public class FreeCam extends Module {
private final FloatValue speedValue = new FloatValue("Speed", 0.8F, 0.1F, 2F);
private final BoolValue flyValue = new BoolValue("Fly", true);
private final BoolValue noClipValue = new BoolValue("NoClip", true);
private EntityOtherPlayerMP fakePlayer = null;
private double oldX;
private double oldY;
private double oldZ;
@Override
public void onEnable() {
if(mc.thePlayer == null)
return;
oldX = mc.thePlayer.posX;
oldY = mc.thePlayer.posY;
oldZ = mc.thePlayer.posZ;
fakePlayer = new EntityOtherPlayerMP(mc.theWorld, mc.thePlayer.getGameProfile());
fakePlayer.clonePlayer(mc.thePlayer, true);
fakePlayer.rotationYawHead = mc.thePlayer.rotationYawHead;
fakePlayer.copyLocationAndAnglesFrom(mc.thePlayer);
mc.theWorld.addEntityToWorld(-1000, fakePlayer);
if(noClipValue.get())
mc.thePlayer.noClip = true;
}
@Override
public void onDisable() {
if(mc.thePlayer == null || fakePlayer == null)
return;
mc.thePlayer.setPositionAndRotation(oldX, oldY, oldZ, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch);
mc.theWorld.removeEntityFromWorld(fakePlayer.getEntityId());
fakePlayer = null;
mc.thePlayer.motionX = 0;
mc.thePlayer.motionY = 0;
mc.thePlayer.motionZ = 0;
}
@EventTarget
public void onUpdate(UpdateEvent event) {
if(noClipValue.get())
mc.thePlayer.noClip = true;
mc.thePlayer.fallDistance = 0;
if(flyValue.get()) {
final float value = speedValue.get();
mc.thePlayer.motionY = 0;
mc.thePlayer.motionX = 0;
mc.thePlayer.motionZ = 0;
if(mc.gameSettings.keyBindJump.isKeyDown())
mc.thePlayer.motionY += value;
if(mc.gameSettings.keyBindSneak.isKeyDown())
mc.thePlayer.motionY -= value;
MovementUtils.strafe(value);
}
}
@EventTarget
public void onPacket(PacketEvent event) {
final Packet<?> packet = event.getPacket();
if(packet instanceof C03PacketPlayer || packet instanceof C0BPacketEntityAction)
event.cancelEvent();
}
}
// NOTE (AI): The packet handler cancels C0B alongside C03, so the detached camera emits neither movement nor sprint and sneak state. The rest is the fake-player spawn and fly logic.
Utility helper: send C0B OPEN_INVENTORY so the server opens the player's inventory without a GUI transition, the trick behind inventory-walk modules.
openInventory() pushes a C0BPacketEntityAction with Action.OPEN_INVENTORY through the raw send queue. The rest of the class is slot math (swap, find, validPotions) shared by AutoPotModule and other modules.
// ===== FILE: November Recode 2.0, utility/player/InventoryUtils.java =====
/* November.lol © 2023 */
package lol.november.utility.player;
import com.google.common.collect.Lists;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.item.*;
import net.minecraft.network.play.client.C0BPacketEntityAction;
import net.minecraft.network.play.client.C0BPacketEntityAction.Action;
import net.minecraft.network.play.client.C0DPacketCloseWindow;
import net.minecraft.potion.Potion;
/**
* @author Gavin
* @since 2.0.0
*/
public class InventoryUtils {
/**
* A list of good items
*/
private static final List<Item> goodItems = Lists.newArrayList(
Items.golden_apple,
Items.apple,
Items.cooked_beef,
Items.cooked_chicken,
Items.cooked_fish,
Items.cooked_mutton,
Items.cooked_porkchop,
Items.cooked_rabbit,
Items.cookie,
Items.snowball,
Items.egg,
Items.rabbit_stew,
Items.mushroom_stew,
Items.ender_pearl,
Items.arrow,
Items.bow,
Items.water_bucket,
Items.lava_bucket
);
/**
* A list of useless blocks
* i want to kms
*/
private static final List<Block> uselessBlocks = Lists.newArrayList(
Blocks.stone_button,
Blocks.wooden_button,
Blocks.stone_pressure_plate,
Blocks.wooden_pressure_plate,
Blocks.light_weighted_pressure_plate,
Blocks.heavy_weighted_pressure_plate,
Blocks.dragon_egg,
Blocks.brewing_stand,
Blocks.chest,
Blocks.ender_chest,
Blocks.enchanting_table,
Blocks.cake,
Blocks.flower_pot,
Blocks.yellow_flower,
Blocks.red_flower,
Blocks.tallgrass,
Blocks.anvil,
Blocks.double_plant,
Blocks.sand,
Blocks.gravel,
Blocks.tripwire,
Blocks.tripwire_hook,
Blocks.carpet,
Blocks.unpowered_repeater,
Blocks.powered_repeater,
Blocks.redstone_wire,
Blocks.torch,
Blocks.redstone_torch,
Blocks.red_mushroom,
Blocks.brown_mushroom,
Blocks.lever,
Blocks.unlit_redstone_torch,
Blocks.bed,
Blocks.snow_layer,
Blocks.skull,
Blocks.stone_slab,
Blocks.stone_slab2,
Blocks.wooden_slab,
Blocks.trapdoor,
Blocks.iron_trapdoor,
Blocks.spruce_door,
Blocks.iron_trapdoor,
Blocks.oak_door,
Blocks.dark_oak_door,
Blocks.jungle_door,
Blocks.birch_door,
Blocks.acacia_door,
Blocks.golden_rail,
Blocks.detector_rail,
Blocks.rail,
Blocks.activator_rail,
Blocks.hopper,
Blocks.unpowered_comparator,
Blocks.powered_comparator
);
/**
* Enchantments used on pieces of armor
*/
private static final List<Enchantment> protectionEnchantments =
Lists.newArrayList(
Enchantment.protection,
Enchantment.projectileProtection,
Enchantment.blastProtection,
Enchantment.fireProtection
);
/**
* A list of good potions
*/
public static final List<Potion> validPotions = Lists.newArrayList(
Potion.fireResistance,
Potion.heal,
Potion.healthBoost,
Potion.moveSpeed,
Potion.digSpeed,
Potion.invisibility,
Potion.damageBoost,
Potion.regeneration,
Potion.resistance,
Potion.waterBreathing,
Potion.nightVision,
Potion.jump
);
/**
* Enchantments commonly on tools
*/
private static final List<Enchantment> toolEnchantments = Lists.newArrayList(
Enchantment.unbreaking,
Enchantment.silkTouch,
Enchantment.fortune,
Enchantment.efficiency
);
private static final Minecraft mc = Minecraft.getMinecraft();
/**
* Spoofs open your inventory
*/
public static void openInventory() {
mc.thePlayer.sendQueue.addToSendQueue(
new C0BPacketEntityAction(mc.thePlayer, Action.OPEN_INVENTORY)
);
}
/**
* Closes the current inventory
*/
public static void closeCurrentInventory() {
mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(windowId()));
}
/**
* Gets the window ID of the container you're in
*
* @return the window id of the container you're in
*/
public static int windowId() {
Container container = mc.thePlayer.openContainer;
return container == null ? 0 : container.windowId;
}
/**
* "Fixes" a slot to be used in a window click packet
*
* @param slot the slot index
* @return the packet slot
*/
public static int fix(int slot) {
return slot < 9 ? slot + 36 : slot;
}
/**
* Checks if the block is useless
*
* @param block the block
* @return if it is useless (lol)
*/
public static boolean blockUseless(Block block) {
return uselessBlocks.contains(block);
}
/**
* Checks if an item is useful
*
* @param item the item
* @return if the item is useful
*/
public static boolean useful(Item item) {
if (item instanceof ItemBlock) {
Block block = ((ItemBlock) item).getBlock();
return !uselessBlocks.contains(block);
}
return goodItems.contains(item);
}
/**
* "Scores" an {@link ItemStack}
*
* @param itemStack the item stack
* @return a score as a float
*/
public static float score(ItemStack itemStack) {
if (itemStack == null || itemStack.getItem() == null) return 0.0f;
if (itemStack.getItem() instanceof ItemArmor itemArmor) {
float score = itemArmor.damageReduceAmount;
for (Enchantment enchantment : protectionEnchantments) {
score +=
EnchantmentHelper.getEnchantmentLevel(
enchantment.effectId,
itemStack
) *
0.75f;
}
score +=
EnchantmentHelper.getEnchantmentLevel(
Enchantment.unbreaking.effectId,
itemStack
) *
0.5f;
return score;
} else if (itemStack.getItem() instanceof ItemSword sword) {
float score = 4.0f + sword.getDamageVsEntity();
score +=
EnchantmentHelper.getEnchantmentLevel(
Enchantment.unbreaking.effectId,
itemStack
) *
0.5f;
score +=
EnchantmentHelper.getEnchantmentLevel(
Enchantment.fireAspect.effectId,
itemStack
) *
0.5f;
score +=
EnchantmentHelper.getEnchantmentLevel(
Enchantment.sharpness.effectId,
itemStack
) *
0.5f;
return score;
} else if (itemStack.getItem() instanceof ItemTool tool) {
Block block = null;
if (tool instanceof ItemPickaxe) {
block = Blocks.stone;
} else if (tool instanceof ItemAxe) {
block = Blocks.log;
} else if (tool instanceof ItemSpade) {
block = Blocks.grass;
}
float score = block == null
? tool.getDamageVsEntity()
: tool.getStrVsBlock(itemStack, Blocks.stone);
for (Enchantment enchantment : toolEnchantments) {
score +=
EnchantmentHelper.getEnchantmentLevel(
enchantment.effectId,
itemStack
) *
0.75f;
}
return score;
} else if (itemStack.getItem() instanceof ItemHoe) {
float score = itemStack
.getItem()
.getStrVsBlock(itemStack, Blocks.hay_block);
for (Enchantment enchantment : toolEnchantments) {
score +=
EnchantmentHelper.getEnchantmentLevel(
enchantment.effectId,
itemStack
) *
0.75f;
}
return score;
} else if (itemStack.getItem() instanceof ItemBow) {
float score = 1.0f;
score +=
EnchantmentHelper.getEnchantmentLevel(
Enchantment.knockback.effectId,
itemStack
) *
0.75f;
score +=
EnchantmentHelper.getEnchantmentLevel(
Enchantment.flame.effectId,
itemStack
) *
0.75f;
score +=
EnchantmentHelper.getEnchantmentLevel(
Enchantment.punch.effectId,
itemStack
) *
0.75f;
return score;
}
return 1.0f;
}
}
// NOTE (AI): The C0B hit is openInventory(): it sends OPEN_INVENTORY so the server opens the player's inventory without a GUI transition, the trick behind inventory-walk modules. The rest of the class is slot math: swap, find, and the validPotions filter AutoPotModule uses.
anticheat Anti-Cheat Checks
The entity action packet carries sprint, crouch, leave-bed, horse jump and inventory-open actions. Sprint and sneak state is the server-side contract anticheats validate: omni-sprint modules forge the sprint action while ignoring hunger and blindness, and toggle spam abuses the state machine. The corpus shows adapters that forward the action (NCP EntityActionAdapter), state checks that validate sprint against food and potions (Grim SprintA, Truthful SprintA), and direction checks on the move stream (Azure OmniSprint).
Post-prediction sprint state check: sprinting with a food level at or below 6 is invalid.
A PostPredictionListener running after the movement simulation. If the prediction was not checked, the player can fly, or the player rides a camel, the check returns (both are legitimate sprint cases). Otherwise, when food is at or below 6 and the client's sprinting flag (set from the entity action packet) is true, it flags with the food level in the verbose; when the flag is false it rewards the balance.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/sprint/SprintA.java =====
package ac.grim.grimac.checks.impl.sprint;
import ac.grim.grimac.api.storage.verbose.Verbose;
import ac.grim.grimac.checks.Check;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.type.PostPredictionListener;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.anticheat.update.PredictionComplete;
import com.github.retrooper.packetevents.protocol.entity.type.EntityTypes;
@CheckData(name = "SprintA", stableKey = "grim.sprint.hunger", description = "Sprinting with too low hunger", setback = 0)
public class SprintA extends Check implements PostPredictionListener {
private static final Verbose V = Verbose.of("hunger={uint}");
public SprintA(GrimPlayer player) {
super(player);
}
@Override
public void onPredictionComplete(PredictionComplete predictionComplete) {
if (!predictionComplete.isChecked()) return;
// Players can sprint if they're able to fly
// Players can also sprint if they are on a camel, regardless of their hunger level
if (player.canFly || EntityTypes.isTypeInstanceOf(player.getVehicleType(), EntityTypes.CAMEL)) return;
if (player.food <= 6.0F) {
if (player.isSprinting) {
flagWithSetback(V.write(verbose()).uint(player.food));
} else {
reward();
}
}
}
}
// NOTE (AI): SprintA runs after the prediction engine and validates sprint state against hunger; the entity action packet sets the sprinting state that this check and the SprintB-G family consume. Grim also carries SprintD/E/F for sprint direction and 1.9+ variants.
Classic omni-sprint detection: diagonal movement direction must agree with the client yaw.
On PlayerMoveEvent with the server-side sprint flag active (set from the entity action packet), it computes deltaX/deltaZ from the movement and the absolute yaw quadrant. Movement diagonally in a direction that contradicts the yaw quadrant is the omni-sprint signature and raises an immediate violation with a 60 second cooldown.
// ===== FILE: AimbotPvP-azure-anticheat, src/main/java/us/skidrevenant/azure/check/checks/motion/OmniSprint.java =====
package us.skidrevenant.azure.check.checks.motion;
import org.bukkit.Location;
import org.bukkit.event.player.PlayerMoveEvent;
import us.skidrevenant.azure.check.Check;
import us.skidrevenant.azure.stats.PlayerStats;
/**
* @author SkidRevenant
* at 30/05/2018
*/
public class OmniSprint extends Check {
public OmniSprint(PlayerStats player) {
super(player);
}
@Override
public void onMove(Location from, Location to, PlayerMoveEvent event) {
double deltaX = to.getX() - from.getX();
double deltaZ = to.getZ() - from.getZ();
float yaw = Math.abs(from.getYaw()) % 360;
if (!player.getBukkitPlayer().isSprinting()) {
return;
}
if (deltaX < 0.0 && deltaZ > 0.0 && yaw > 180.0f && yaw < 270.0f || deltaX < 0.0 && deltaZ < 0.0 && yaw > 270.0f && yaw < 360.0f || deltaX > 0.0 && deltaZ < 0.0 && yaw > 0.0f && yaw < 90.0f || deltaX > 0.0 && deltaZ > 0.0 && yaw > 90.0f && yaw < 180.0f) {
onViolation("OmniSprint", 60000L, 0);
}
}
}
// NOTE (AI): Azure OmniSprint flags movement direction that contradicts the client yaw while the server-side sprint flag is set (set from the entity action packet); the classic omni-sprint signature is diagonal motion with a 90 degree yaw offset.
The ProtocolLib bridge for the entity action packet, feeding NCP's net toggle-frequency check.
A BaseAdapter registered at LOW priority for ENTITY_ACTION. It resolves player data safely, records the action timestamp into the player action frequency buffer, refreshes the last-packet time, and runs the ToggleFrequency check that limits how often sprint and sneak can be toggled. A cancel decision requests a setback through the player data.
// ===== FILE: Updated-NoCheatPlus-NoCheatPlus, NCPCompatProtocolLib/src/main/java/fr/neatmonster/nocheatplus/checks/net/protocollib/EntityActionAdapter.java =====
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package fr.neatmonster.nocheatplus.checks.net.protocollib;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.reflect.StructureModifier;
import com.comphenix.protocol.wrappers.EnumWrappers.PlayerAction;
import fr.neatmonster.nocheatplus.checks.CheckType;
import fr.neatmonster.nocheatplus.checks.net.NetConfig;
import fr.neatmonster.nocheatplus.checks.net.NetData;
import fr.neatmonster.nocheatplus.checks.net.ToggleFrequency;
import fr.neatmonster.nocheatplus.logging.StaticLog;
import fr.neatmonster.nocheatplus.players.DataManager;
import fr.neatmonster.nocheatplus.players.IPlayerData;
/**
* Adapter for the EntityAction NMS packet.
*/
public class EntityActionAdapter extends BaseAdapter {
private final ToggleFrequency toggleFrequency = new ToggleFrequency();
private static PacketType[] initPacketTypes() {
final List<PacketType> types = new LinkedList<PacketType>(Arrays.asList(PacketType.Play.Client.ENTITY_ACTION));
return types.toArray(new PacketType[types.size()]);
}
public EntityActionAdapter(Plugin plugin) {
super(plugin, ListenerPriority.LOW, initPacketTypes());
}
@Override
public void onPacketReceiving(final PacketEvent event) {
// Do some early return tests first.
try {
if (event.isPlayerTemporary()) return;
}
catch (NoSuchMethodError e) {}
// Not interested in any other packet.
if (event.getPacketType() != PacketType.Play.Client.ENTITY_ACTION) {
return;
}
final Player player = event.getPlayer();
if (player == null) {
counters.add(ProtocolLibComponent.idNullPlayer, 1);
return;
}
final IPlayerData pData = DataManager.getPlayerDataSafe(player);
if (pData == null) {
StaticLog.logWarning("Failed to fetch player data with " + event.getPacketType() + " for: " + player.toString());
return;
}
final StructureModifier<PlayerAction> actions = event.getPacket().getPlayerActions();
// if (actions.size() != 1) {
// StaticLog.logWarning("Unexpected packet size for EntityActionAdapter: " + actions.size());
// return;
// }
final NetData data = pData.getGenericInstance(NetData.class);
// (This check might invalidate the current BedLeave implementation...)
// Currently, we don't discern action types from one another.
data.playerActionFreq.add(System.currentTimeMillis(), 1f);
// Always set last received time.
data.lastKeepAliveTime = System.currentTimeMillis();
boolean cancel = false;
if (!cancel && pData.isCheckActive(CheckType.NET_TOGGLEFREQUENCY, player)
&& toggleFrequency.check(player, data, pData.getGenericInstance(NetConfig.class), pData)
&& !pData.hasBypass(CheckType.NET_TOGGLEFREQUENCY, player)) {
cancel = true;
}
// Request a setback
if (cancel) {
data.requestSetBack(player, this, plugin, checkType);
}
}
}
// NOTE (AI): NCP's EntityActionAdapter is the ProtocolLib bridge for PacketPlayInEntityAction: it records action frequency and last-packet time, then runs the net ToggleFrequency check that limits how often the player may toggle sprint and sneak.
Sprint state validity check on the movement stream: sprinting is illegal with blindness or with food at or below 6.
Handles relative-move wrappers on position updates. If the player is not sprinting (sprint state set from the entity action packet) the buffer decays. When sprinting and not allowed to fly, blindness adds 2.0 to the buffer (flag at 4.0) and food at or below 6 adds 1.0 (flag at 5.0), with a decaying buffer that resets on quit.
// ===== FILE: TawnyE-TruthfulAC, src/main/java/ret/tawny/truthful/checks/impl/packet/sprint/SprintA.java =====
package ret.tawny.truthful.checks.impl.packet.sprint;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.potion.PotionEffectType;
import ret.tawny.truthful.Truthful;
import ret.tawny.truthful.checks.api.Check;
import ret.tawny.truthful.checks.api.CheckBuffer;
import ret.tawny.truthful.checks.api.data.CheckData;
import ret.tawny.truthful.checks.api.data.CheckType;
import ret.tawny.truthful.data.PlayerData;
import ret.tawny.truthful.wrapper.impl.client.position.RelMovePacketWrapper;
@CheckData(order = 'A', type = CheckType.SPRINT)
public final class SprintA extends Check {
private final CheckBuffer buffer = new CheckBuffer(10.0);
@Override
public void handleRelMove(final RelMovePacketWrapper wrapper) {
if (!wrapper.isPositionUpdate()) return;
final Player player = wrapper.getPlayer();
final PlayerData data = Truthful.getInstance().getDataManager().getPlayerData(player);
if (data == null) return;
if (!data.isSprinting()) {
buffer.decrease(player, 0.5);
return;
}
if (data.isAllowFlight()) return;
// 1. Blindness Check
if (data.hasPotionEffect(PotionEffectType.BLINDNESS)) {
if (buffer.increase(player, 2.0) > 4.0) {
flag(data, "OmniSprint (Blindness)");
}
return;
}
// 2. Hunger Check
int foodLevel = data.getFoodLevel();
if (foodLevel <= 6) {
if (buffer.increase(player, 1.0) > 5.0) {
// DETAILED INFO FOR ALERT
flag(data, String.format("OmniSprint (Hunger: %d)", foodLevel));
}
} else {
buffer.decrease(player, 0.25);
}
}
@EventHandler
public void onQuit(final PlayerQuitEvent event) {
buffer.remove(event.getPlayer());
}
}
// NOTE (AI): Truthful SprintA is a state check on the movement stream: sprinting is invalid with blindness or with food at or below 6, using a buffer for both cases; sprint state itself is tracked from the entity action packet.
Related Packets
Wiki Cross-Reference
The leave-bed action is only sent when the Leave Bed button is clicked in the sleep GUI, not on a natural morning wake. The vanilla server ignores the entity ID field and applies the action to the sending player.
MCP 1.8.9 C0BPacketEntityAction implements Packet
1.8.9 callers: EntityPlayerSP.onUpdateWalkingPlayer sends new C0BPacketEntityAction (line 197) +1 more: 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 C0BPacketEntityAction
Full source walkthroughs of the modules and anti-cheats that use this packet.