0x18 C18PacketSpectate
Spectator mode player teleports to another entity or player by UUID. Only works in spectator gamemode (3).
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| targetUUID | UUID | UUID of the entity to spectate/follow |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Target UUID | UUID | UUID as two longs (most/least significant bits) |
MCP References
NetHandlerPlayServer.processSpectate()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 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
Deobfuscated MCP 1.8.9 source of C18PacketSpectate, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/client/C18PacketSpectate.java) at build time and verified present.
Deep Dive
Role in the protocol
C18 teleports a spectator's camera to an entity by UUID. It is the spectator-menu action behind PlayerMenuObject, and the server processes it only for players in spectator gamemode. On the wire it is a single UUID, which the server must resolve by scanning every loaded world, making it one of the most expensive cheap packets in the play state.
Vanilla handling
handleSpectate gates on isSpectator, then iterates all WorldServer instances calling packetIn.getEntity(worldserver) until the UUID resolves. On a hit it attaches the player's spectating entity and teleports the camera; on a miss nothing happens. The isSpectator gate makes the whole handler a no-op for survival players, which is the property disablers exploit: the packet is safe to spam precisely because it does nothing for non-spectators.
Why clients touch it
Four families. (1) Disablers: Rise 5.99 sends random-UUID C18 every tick in verusOld and mineland modes and own-UUID C18 in c18/shartemis modes; Rise 6.x SpectateDisabler sends own-UUID C18 every strafe. (2) Memeware 7.3's CubeCraft exploit suite: MultiAura, Fly and Speed all send C18 with the fixed CubeUtil.CUBECRAFT_UUID as part of movement and attack sequences. (3) Tenacity's Criticals carries a commented-out random-UUID C18. (4) November Recode 2.0's scripting layer: LuaEventPacket maps C18PacketSpectate to wire id 0x18 so Lua scripts can match the packet by id.
Exploit surface
Every C18 costs a cross-world entity lookup, so a per-tick random UUID is both a desync tool and a CPU load on the server; the mineland mode sends it from onStrafe, multiplying it by movement ticks. The own-UUID variant is the stealthier one: it resolves to the player's own entity and exercises the spectator re-attach path. Servers detect abuse by counting C18 from non-spectators, which is why disablers pair it with cancelled C0F streams rather than volume alone.
Server-Side Handling
handleSpectate: isSpectator gate, then a world-by-world getEntity(UUID) scan; on resolution, setSpectatingEntity and camera teleport; on miss, silent no-op. The lookup is unindexed in the bundled 1.8.9 sources, so the cost scales with loaded entity count across all dimensions.
Protocol Analysis
Single UUID (two longs). Sent in PLAY state; the spectator menu (PlayerMenuObject) is the vanilla emitter. The packet has no position field: the camera follows the resolved entity. A random UUID guarantees a full scan miss; the player's own UUID always resolves.
Anti-Cheat Landscape
Anti-cheats count C18 from non-spectators as a disabler fingerprint; a steady per-tick stream from a survival player is the classic Verus-era desync pattern that Rise 5.99's verusOld mode targets. The own-UUID variant is subtler because it resolves and touches the spectator re-attach path. Memeware's CubeCraft usage predates server-side counters on that network.
implementation Implementation Cases
The spectator teleport packet. Disablers spam random or own UUIDs to force cross-world entity lookups and desync (Rise 5.99, Rise 6.x SpectateDisabler), while Memeware 7.3 rides it with a fixed CubeCraft UUID in its aura, fly and speed modules. November Recode 2.0 only reaches it through its Lua packet wrapper (id 0x18), with no Java module usage.
Spam C18 with random or own UUIDs to force server-side entity lookups and desync anti-cheat position tracking.
verusOld sends C18(UUID.randomUUID()) every tick with a C0C input; c18 and shartemis send C18(own UUID); mineland sends C18(random UUID) from onStrafe. All go through sendPacketWithoutEvent.
// ===== FILE: Rise 5.99, dev/rise/module/impl/other/Disabler.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.other;
import de.gerrygames.viarewind.utils.ChatUtil;
import dev.rise.Rise;
import dev.rise.event.impl.motion.PreMotionEvent;
import dev.rise.event.impl.motion.TeleportEvent;
import dev.rise.event.impl.other.AttackEvent;
import dev.rise.event.impl.other.StrafeEvent;
import dev.rise.event.impl.other.WorldChangedEvent;
import dev.rise.event.impl.packet.PacketReceiveEvent;
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.module.impl.movement.Fly;
import dev.rise.module.impl.movement.LongJump;
import dev.rise.module.impl.player.Scaffold;
import dev.rise.notifications.NotificationType;
import dev.rise.setting.Setting;
import dev.rise.setting.impl.BooleanSetting;
import dev.rise.setting.impl.NoteSetting;
import dev.rise.util.math.MathUtil;
import dev.rise.util.math.TimeUtil;
import dev.rise.util.pathfinding.MainPathFinder;
import dev.rise.util.player.MoveUtil;
import dev.rise.util.player.PacketUtil;
import dev.rise.util.player.PlayerUtil;
import io.netty.buffer.Unpooled;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.client.*;
import net.minecraft.network.play.server.*;
import net.minecraft.util.*;
import org.apache.commons.lang3.RandomUtils;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentLinkedQueue;
/**
* This module is designed to disable an anticheat or some of its checks
* in order to make bypassing easier/having extreme bypasses.
*/
@ModuleInfo(name = "Disabler", description = "Disables some servers AntiCheats", category = Category.OTHER)
public final class Disabler extends Module {
private final NoteSetting modeSettings = new NoteSetting("Mode Settings", this);
private final BooleanSetting hypixel = new BooleanSetting("Hypixel", this, false);
private final BooleanSetting mineland = new BooleanSetting("Mineland", this, false);
private final BooleanSetting mmcKeepSprint = new BooleanSetting("Minemenclub Keepsprint Check", this, false);
private final BooleanSetting mmcReach = new BooleanSetting("Minemenclub Reach Semi", this, false);
private final BooleanSetting hypixelSlime = new BooleanSetting("Hypixel Slime", this, false);
private final BooleanSetting dynamicPvP = new BooleanSetting("Dynamic PvP", this, false);
private final BooleanSetting ghostlyCombat = new BooleanSetting("Ghostly Combat", this, false);
private final BooleanSetting ghostly = new BooleanSetting("Ghostly", this, false);
private final BooleanSetting lunar = new BooleanSetting("Lunar", this, false);
private final BooleanSetting position = new BooleanSetting("Position Edit", this, false);
private final BooleanSetting vulcanCombat = new BooleanSetting("Vulcan Reach A", this, false);
private final BooleanSetting verusCombat = new BooleanSetting("Verus Combat", this, false);
private final BooleanSetting verus = new BooleanSetting("Verus", this, false);
private final BooleanSetting blocksMC = new BooleanSetting("BlocksMC", this, false);
private final BooleanSetting sentinel = new BooleanSetting("Sentinel", this, false);
private final BooleanSetting shartemis = new BooleanSetting("Shartemis Movement", this, false);
//Any disabler after this line will be hidden if this is true
private final BooleanSetting hideOldDisablers = new BooleanSetting("Hide Old Disablers", this, true);
private final NoteSetting oldModeSettings = new NoteSetting("Old Mode Settings", this);
private final BooleanSetting verusOld = new BooleanSetting("Verus Old", this, false);
private final BooleanSetting spartan = new BooleanSetting("Spartan", this, false);
private final BooleanSetting voidTp = new BooleanSetting("Void TP", this, false);
private final BooleanSetting clip = new BooleanSetting("Clip", this, false);
private final BooleanSetting tecnioRaper = new BooleanSetting("Tecnio AC Disabler", this, false);
private final BooleanSetting convertMovingPackets = new BooleanSetting("Covert Moving Packets", this, false);
private final BooleanSetting reverseConvertMovingPackets = new BooleanSetting("Reverse Covert Moving Packets", this, false);
private final BooleanSetting funnyCraft = new BooleanSetting("Funcraft", this, false);
private final BooleanSetting oxygen = new BooleanSetting("Oxygen", this, false);
private final NoteSetting packetSettings = new NoteSetting("Packet Settings", this);
private final BooleanSetting coc = new BooleanSetting("PacketInput", this, false);
private final BooleanSetting c0f = new BooleanSetting("ConfirmTransaction", this, false);
private final BooleanSetting c00 = new BooleanSetting("PacketKeepAlive", this, false);
private final BooleanSetting c08 = new BooleanSetting("PacketPlayerBlockPlacement", this, false);
private final BooleanSetting c13 = new BooleanSetting("PacketPlayerAbilities", this, false);
private final BooleanSetting c16 = new BooleanSetting("PacketClientStatus", this, false);
private final BooleanSetting c18 = new BooleanSetting("PacketSpectate", this, false);
private final BooleanSetting c19 = new BooleanSetting("PacketResourcePacketStatus", this, false);
private final ConcurrentLinkedQueue<Packet<?>> packetList = new ConcurrentLinkedQueue<>();
private final ConcurrentLinkedQueue<Packet<?>> packetList2 = new ConcurrentLinkedQueue<>();
private final ConcurrentHashMap<Packet<?>, Long> packetHashMap = new ConcurrentHashMap<>();
private final ConcurrentLinkedQueue<Packet<?>> transactions = new ConcurrentLinkedQueue<>();
private final ConcurrentLinkedQueue<Packet<?>> keepAlives = new ConcurrentLinkedQueue<>();
public static final ConcurrentLinkedQueue<PacketUtil.TimedPacket> packets = new ConcurrentLinkedQueue<>();
public static boolean spoofing;
private int ticksSinceTeleport;
private long currentDelay;
private final TimeUtil timer = new TimeUtil();
private long nextSend;
private boolean teleported;
private boolean exempt;
private float previousYaw, previousPitch;
@Override
public void onAttackEvent(final AttackEvent event) {
if (event.getTarget() != null) {
if (ghostlyCombat.isEnabled()) {
final double distance = mc.thePlayer.getDistanceToEntity(event.getTarget()) - 0.5657;
if (distance > 2.9) {
if (mc.thePlayer.canEntityBeSeen(event.getTarget()))
PacketUtil.sendPacket(new C03PacketPlayer.C04PacketPlayerPosition(event.getTarget().posX, event.getTarget().posY, event.getTarget().posZ, false));
else
event.setCancelled(true);
}
}
}
}
@Override
public void onUpdateAlwaysInGui() {
boolean hideAllAfter = false;
for (final Setting setting : getSettings()) {
setting.hidden = hideAllAfter;
if (hideOldDisablers == setting && hideOldDisablers.isEnabled()) {
hideAllAfter = true;
}
}
}
@Override
protected void onEnable() {
if (mc.isIntegratedServerRunning())
return;
if (hypixel.isEnabled()) {
final ChatComponentText chatcomponenttext = new ChatComponentText("Rejoin");
mc.getNetHandler().getNetworkManager().closeChannel(chatcomponenttext);
}
if (mmcReach.isEnabled()) {
Rise.INSTANCE.getNotificationManager().registerNotification("You need low ping for this disabler to not kick.", NotificationType.WARNING);
}
transactions.clear();
keepAlives.clear();
teleported = false;
timer.reset();
}
@Override
protected void onDisable() {
packetList.forEach(PacketUtil::sendPacketWithoutEvent);
packetList.clear();
spoofing = false;
packetList2.forEach(PacketUtil::sendPacketWithoutEvent);
packetList2.clear();
transactions.clear();
keepAlives.clear();
packetHashMap.clear();
mc.timer.timerSpeed = 1;
}
@Override
public void onPreMotion(final PreMotionEvent event) {
if (mc.isIntegratedServerRunning())
return;
if (hypixel.isEnabled() && PlayerUtil.isOnServer("Hypixel")) {
spoofing = true;
for (final PacketUtil.TimedPacket p : packets) {
if (System.currentTimeMillis() > p.getTime() + currentDelay) {
PacketUtil.sendPacketWithoutEvent(p.getPacket());
packets.remove(p);
this.currentDelay = Math.round(MathUtil.getRandom(200,250));
}
}
}
if (verusOld.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput());
PacketUtil.sendPacketWithoutEvent(new C18PacketSpectate(UUID.randomUUID()));
}
if (blocksMC.isEnabled()) {
if (mc.thePlayer.ticksExisted % 100 == 0) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.onGround));
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, -0.015625, mc.thePlayer.posZ, false));
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.onGround));
teleported = true;
}
if (timer.hasReached(500L) && !transactions.isEmpty()) {
PacketUtil.sendPacketWithoutEvent(transactions.poll());
timer.reset();
}
if (timer.hasReached(400L) && !keepAlives.isEmpty()) {
PacketUtil.sendPacketWithoutEvent(keepAlives.poll());
timer.reset();
}
}
if (hypixelSlime.isEnabled() && mc.thePlayer.capabilities.allowFlying) {
if (PlayerUtil.isOnServer("Hypixel")) {
final PlayerCapabilities playerCapabilities = new PlayerCapabilities();
playerCapabilities.isFlying = true;
PacketUtil.sendPacket(new C13PacketPlayerAbilities(playerCapabilities));
} else
PacketUtil.sendPacket(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.RIDING_JUMP));
}
if (vulcanCombat.isEnabled()) {
if (timer.hasReached((long) (5000 + (Math.random() * 1000)))) {
packetList2.forEach(PacketUtil::sendPacketWithoutEvent);
packetList2.clear();
timer.reset();
}
}
if (sentinel.isEnabled()) {
for (final Iterator<Map.Entry<Packet<?>, Long>> iterator = packetHashMap.entrySet().iterator(); iterator.hasNext(); ) {
final Map.Entry<Packet<?>, Long> entry = iterator.next();
if (entry.getValue() < System.currentTimeMillis()) {
PacketUtil.sendPacket(entry.getKey());
iterator.remove();
}
}
}
if (mmcReach.isEnabled()) {
if (timer.hasReached((long) (500 + (Math.random() * 600)))) {
packetList.forEach(PacketUtil::sendPacketWithoutEvent);
packetList.clear();
timer.reset();
}
}
if (oxygen.isEnabled() && mc.thePlayer.onGround) {
event.setY(event.getY() + 0.42F);
event.setGround(false);
}
if (voidTp.isEnabled() && mc.thePlayer.ticksExisted % 20 == 0)
event.setY(event.getY() - 20 - Math.random());
if (clip.isEnabled()) {
if (mc.thePlayer.ticksExisted % 20 == 0) {
event.setY(event.getY() - 0.42);
event.setGround(false);
}
}
if (coc.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput(0.98F, 0.0F, false, false));
}
if (c08.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C08PacketPlayerBlockPlacement(mc.thePlayer.getHeldItem()));
}
if (c13.isEnabled() || shartemis.isEnabled()) {
final C13PacketPlayerAbilities abilities = new C13PacketPlayerAbilities();
abilities.setAllowFlying(true);
abilities.setFlying(true);
PacketUtil.sendPacketWithoutEvent(abilities);
}
if (c16.isEnabled() || shartemis.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C16PacketClientStatus(C16PacketClientStatus.EnumState.PERFORM_RESPAWN));
}
if (c18.isEnabled() || shartemis.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C18PacketSpectate(mc.thePlayer.getUniqueID()));
}
if (c19.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C19PacketResourcePackStatus("", C19PacketResourcePackStatus.Action.ACCEPTED));
}
if (tecnioRaper.isEnabled()) {
for (int i = 0; i < 10; i++) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(
mc.thePlayer.posX, mc.thePlayer.posY, Double.MAX_VALUE, 0.0F, 0.0F, true
));
}
for (int i = 0; i < 40; i++) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(
Double.MAX_VALUE, mc.thePlayer.posY, mc.thePlayer.posZ, 0.0F, 0.0F, true
));
}
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer(true));
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer(true));
tecnioRaper.setEnabled(false);
}
if (funnyCraft.isEnabled()) {
if (mc.thePlayer.ticksExisted % 4 == 0) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput(Float.MAX_VALUE, Float.MAX_VALUE, false, false));
}
}
}
@Override
public void onTeleportEvent(final TeleportEvent event) {
if (blocksMC.isEnabled()) {
if (teleported) {
event.setCancelled(true);
}
teleported = false;
}
if(hypixel.isEnabled() && PlayerUtil.isOnServer("Hypixel")){
if (mc.thePlayer.ticksExisted < 100) {
event.setCancelled(true);
return;
}
this.ticksSinceTeleport = 0;
}
// if (mc.thePlayer.getDistance(event.getPosX(), event.getPosY(), event.getPosZ()) <= 9.5) {
// PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(event.getPosX(), event.getPosY(), event.getPosZ(), event.getYaw(), event.getPitch(), false));
// event.setCancelled(true);
// }
// teleported = false;
}
@Override
public void onPacketReceive(final PacketReceiveEvent event) {
if (mc.isIntegratedServerRunning()) return;
final Packet<?> p = event.getPacket();
if (hypixel.isEnabled()) {
final Packet<?> packet = event.getPacket();
if (packet instanceof S08PacketPlayerPosLook) {
nextSend = 0;
}
}
if (hypixelSlime.isEnabled()) {
if (p instanceof S02PacketChat) {
final S02PacketChat chatMessage = (S02PacketChat) event.getPacket();
if (chatMessage.getType() == 2 && chatMessage.getChatComponent().getUnformattedText().contains("UNAVAILABLE")) {
chatMessage.chatComponent = new ChatComponentText("§aDOUBLE JUMP AVAILABLE§r");
}
}
if (p instanceof S29PacketSoundEffect) {
final S29PacketSoundEffect packetSoundEffect = (S29PacketSoundEffect) event.getPacket();
if (packetSoundEffect.getSoundName().equals("mob.slime.big")) {
event.setCancelled(true);
}
}
if (p instanceof S2APacketParticles) {
final S2APacketParticles particle = (S2APacketParticles) event.getPacket();
if (particle.getParticleType() == EnumParticleTypes.SLIME) {
event.setCancelled(true);
}
}
if (p instanceof S1FPacketSetExperience) {
event.setCancelled(true);
}
}
if (verus.isEnabled()) {
if (p instanceof S08PacketPlayerPosLook && timer.hasReached(1000)) {
final S08PacketPlayerPosLook packet = (S08PacketPlayerPosLook) p;
if (mc.thePlayer.getDistanceSq(packet.x, packet.y, packet.z) <= 9.5) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(packet.x, packet.y, packet.z, packet.yaw, packet.pitch, false));
event.setCancelled(true);
}
teleported = false;
timer.reset();
}
}
}
@Override
public void onPacketSend(final PacketSendEvent event) {
if (mc.isIntegratedServerRunning())
return;
final Packet<?> packet = event.getPacket();
if (hypixel.isEnabled() && PlayerUtil.isOnServer("Hypixel")) {
if (packet instanceof C03PacketPlayer) {
final C03PacketPlayer wrapper = (C03PacketPlayer) packet;
if (wrapper instanceof C03PacketPlayer.C06PacketPlayerPosLook && ticksSinceTeleport <= 50 && mc.thePlayer.sendQueue.doneLoadingTerrain) {
event.setPacket(new C03PacketPlayer.C04PacketPlayerPosition(wrapper.x + Double.MIN_NORMAL, wrapper.y, wrapper.z - Double.MIN_NORMAL, ((C03PacketPlayer.C06PacketPlayerPosLook) wrapper).isOnGround()));
}
}
ticksSinceTeleport++;
if (mc.thePlayer == null || !mc.thePlayer.sendQueue.doneLoadingTerrain) {
packets.clear();
return;
}
if (mc.thePlayer.isDead || mc.isSingleplayer()) {
packets.forEach(p -> PacketUtil.sendPacketWithoutEvent(p.getPacket()));
packets.clear();
return;
}
if (spoofing) {
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive) {
packets.add(new PacketUtil.TimedPacket(packet, System.currentTimeMillis()));
event.setCancelled(true);
}
} else if (packet instanceof C03PacketPlayer) {
packets.forEach(p -> PacketUtil.sendPacketWithoutEvent(p.getPacket()));
packets.clear();
}
}
if (vulcanCombat.isEnabled() && packet instanceof C0FPacketConfirmTransaction) {
packetList2.add(packet);
event.setCancelled(true);
}
if (mineland.isEnabled()) {
if (event.getPacket() instanceof C03PacketPlayer && !mc.thePlayer.isSwingInProgress && !mc.thePlayer.isUsingItem() && !((C03PacketPlayer) event.getPacket()).isMoving()) {
event.setCancelled(true);
}
}
if (blocksMC.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction) {
transactions.add(packet);
event.setCancelled(true);
if (transactions.size() > 300) {
PacketUtil.sendPacketWithoutEvent(transactions.poll());
}
}
if (packet instanceof C00PacketKeepAlive) {
final C00PacketKeepAlive c00 = (C00PacketKeepAlive) packet;
c00.key -= 30;
keepAlives.add(c00);
event.setCancelled(true);
}
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (mc.thePlayer.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
mc.thePlayer.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
if (packet instanceof C03PacketPlayer && !mc.thePlayer.isSwingInProgress &&
!mc.thePlayer.isUsingItem() && !((C03PacketPlayer) packet).isMoving()) {
event.setCancelled(true);
}
}
if (verus.isEnabled()) {
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
if (packet instanceof C00PacketKeepAlive) {
final C00PacketKeepAlive c00 = (C00PacketKeepAlive) packet;
c00.key = -c00.key;
}
if (packet instanceof C03PacketPlayer) {
final C03PacketPlayer c03 = (C03PacketPlayer) packet;
mc.timer.timerSpeed = 0.75F;
if (c03.y % 0.015625 == 0)
c03.setOnGround(true);
if (timer.hasReached(1000) && !teleported) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition());
teleported = true;
}
if (mc.thePlayer.ticksExisted % 100 == 0)
teleported = false;
}
}
if (verusCombat.isEnabled() && mc.thePlayer.ticksExisted > 20 && !mc.thePlayer.capabilities.allowFlying) {
if (packet instanceof C0FPacketConfirmTransaction)
event.setCancelled(true);
}
if (position.isEnabled() && packet instanceof C03PacketPlayer) {
final C03PacketPlayer c03 = (C03PacketPlayer) event.getPacket();
c03.setY(c03.getY() + 0.015625);
}
if (ghostly.isEnabled()) {
if (packet instanceof C03PacketPlayer) {
PacketUtil.sendPacketWithoutEvent(new C0CPacketInput());
C03PacketPlayer c03PacketPlayer = ((C03PacketPlayer) packet);
double mathGround = Math.round(c03PacketPlayer.y / 0.015625) * 0.015625;
c03PacketPlayer.y = mathGround;
c03PacketPlayer.setOnGround(true);
event.setPacket(c03PacketPlayer);
}
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
}
if (dynamicPvP.isEnabled()) {
if (packet instanceof C03PacketPlayer) {
if (mc.thePlayer.ticksExisted % 3 == 0)
event.setCancelled(true);
final C03PacketPlayer packetPlayer = (C03PacketPlayer) event.getPacket();
double x = mc.thePlayer.posX, y = mc.thePlayer.posY, z = mc.thePlayer.posZ;
if (packetPlayer.isMoving()) {
x = packetPlayer.getPositionX();
y = packetPlayer.getPositionY();
z = packetPlayer.getPositionZ();
}
if (mc.thePlayer.ticksExisted % 20 == 0)
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C04PacketPlayerPosition(x, y, z, packetPlayer.isOnGround()));
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(x, y, z, mc.thePlayer.rotationYaw, mc.thePlayer.rotationPitch, packetPlayer.isOnGround()));
}
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive)
event.setCancelled(true);
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
}
if (spartan.isEnabled()) {
PacketUtil.sendPacketWithoutEvent(new C03PacketPlayer.C06PacketPlayerPosLook(mc.thePlayer.posX, mc.thePlayer.posY, mc.thePlayer.posZ, mc.thePlayer.rotationYaw, 91, mc.thePlayer.onGround));
}
if (sentinel.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive) {
// packetHashMap.put(p, System.currentTimeMillis() + RandomUtils.nextLong(15000, 25000));
event.setCancelled(true);
}
if (packet instanceof C03PacketPlayer.C04PacketPlayerPosition) {
final C03PacketPlayer.C04PacketPlayerPosition packetPlayerPosition = (C03PacketPlayer.C04PacketPlayerPosition) packet;
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), mc.thePlayer.rotationYaw + (mc.thePlayer.ticksExisted % 2 == 0 ? RandomUtils.nextFloat(0.05F, 0.1F) : -RandomUtils.nextFloat(0.05F, 0.1F)), mc.thePlayer.rotationPitch, packetPlayerPosition.isOnGround()));
}
}
if (c0f.isEnabled() || shartemis.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction)
event.setCancelled(true);
}
if (c00.isEnabled()) {
if (packet instanceof C00PacketKeepAlive)
event.setCancelled(true);
}
if (lunar.isEnabled()) {
if (packet instanceof C0FPacketConfirmTransaction || packet instanceof C00PacketKeepAlive)
event.setCancelled(true);
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
if (packet instanceof C03PacketPlayer.C04PacketPlayerPosition) {
final C03PacketPlayer.C04PacketPlayerPosition packetPlayerPosition = (C03PacketPlayer.C04PacketPlayerPosition) packet;
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), mc.thePlayer.rotationYaw + (mc.thePlayer.ticksExisted % 2 == 0 ? RandomUtils.nextFloat(0.05F, 0.1F) : -RandomUtils.nextFloat(0.05F, 0.1F)), mc.thePlayer.rotationPitch, packetPlayerPosition.isOnGround()));
}
}
if (reverseConvertMovingPackets.isEnabled()) {
if (packet instanceof C03PacketPlayer.C06PacketPlayerPosLook) {
final C03PacketPlayer.C06PacketPlayerPosLook packetPlayerPosition = (C03PacketPlayer.C06PacketPlayerPosLook) packet;
event.setPacket(new C03PacketPlayer.C04PacketPlayerPosition(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), packetPlayerPosition.isOnGround()));
}
}
if (convertMovingPackets.isEnabled()) {
if (packet instanceof C03PacketPlayer.C04PacketPlayerPosition) {
final C03PacketPlayer.C04PacketPlayerPosition packetPlayerPosition = (C03PacketPlayer.C04PacketPlayerPosition) packet;
event.setPacket(new C03PacketPlayer.C06PacketPlayerPosLook(packetPlayerPosition.getX(), packetPlayerPosition.getY(), packetPlayerPosition.getZ(), mc.thePlayer.rotationYaw + (mc.thePlayer.ticksExisted % 2 == 0 ? RandomUtils.nextFloat(0.05F, 0.1F) : -RandomUtils.nextFloat(0.05F, 0.1F)), mc.thePlayer.rotationPitch, packetPlayerPosition.isOnGround()));
}
}
if (mmcKeepSprint.isEnabled()) {
if (packet instanceof C0BPacketEntityAction) {
final C0BPacketEntityAction c0B = (C0BPacketEntityAction) packet;
if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
if (EntityPlayerSP.serverSprintState) {
PacketUtil.sendPacketWithoutEvent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
EntityPlayerSP.serverSprintState = false;
}
event.setCancelled(true);
}
if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
event.setCancelled(true);
}
}
}
if (mmcReach.isEnabled() && (PlayerUtil.isOnServer("minemen") || PlayerUtil.isOnServer("mineman"))) {
if (packet instanceof C0FPacketConfirmTransaction) {
event.setCancelled(true);
}
}
}
@Override
public void onStrafe(final StrafeEvent event) {
if (mineland.isEnabled()) {
PacketUtil.sendPacket(new C18PacketSpectate(UUID.randomUUID()));
}
}
@Override
public void onWorldChanged(final WorldChangedEvent event) {
}
}
// NOTE (AI): The C18 hits are in three disabler modes. verusOld sends C18 with UUID.randomUUID() every tick alongside C0C input; c18/shartemis modes send C18 with the player's own UUID; mineland sends C18 with a random UUID from onStrafe. The random-UUID forms force the server's handleSpectate to search every world for an entity that does not exist; the own-UUID form targets the spectator reset path. All three are sendPacketWithoutEvent, so they never re-enter the event bus.Send own-UUID C18 every strafe as a cheap desync probe against servers that track spectator packets.
On StrafeEvent, sends C18(mc.thePlayer.getUniqueID()) via sendNoEvent without any rate gating.
// ===== FILE: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/exploit/disabler/SpectateDisabler.java =====
package com.alan.clients.module.impl.exploit.disabler;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.StrafeEvent;
import com.alan.clients.module.impl.exploit.Disabler;
import com.alan.clients.util.packet.PacketUtil;
import com.alan.clients.value.Mode;
import net.minecraft.network.play.client.C18PacketSpectate;
public class SpectateDisabler extends Mode<Disabler> {
public SpectateDisabler(String name, Disabler parent) {
super(name, parent);
}
@EventLink
public final Listener<StrafeEvent> onStrafe = event -> {
PacketUtil.sendNoEvent(new C18PacketSpectate(mc.thePlayer.getUniqueID()));
};
}
// NOTE (AI): SpectateDisabler is a Mode of the Rise 6.x Disabler. On every StrafeEvent it sends C18 with the player's own UUID via sendNoEvent. For a non-spectator the server's handleSpectate is a no-op after the isSpectator gate, so the packet is a free desync probe: it exercises the server's entity lookup every strafe without changing any state.Send C18 with the fixed CubeCraft UUID before each attack as part of the CubeCraft-targeted aura sequence.
In doUpdate, for every target the aura sends C18(CubeUtil.CUBECRAFT_UUID) silently, swings, then sends the C02 attack; the loop repeats on the click-speed timer.
// ===== FILE: Memeware 7.3, me/memewaredevs/client/module/combat/aura/MultiAura.java =====
package me.memewaredevs.client.module.combat.aura;
import me.memewaredevs.client.event.events.UpdateEvent;
import me.memewaredevs.client.module.combat.Aura;
import me.memewaredevs.client.util.CubeUtil;
import me.memewaredevs.client.util.combat.CombatUtil;
import me.memewaredevs.client.util.combat.RotationUtils;
import me.memewaredevs.client.util.misc.Timer;
import me.memewaredevs.client.util.packet.PacketUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemSword;
import net.minecraft.network.play.client.C02PacketUseEntity;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.network.play.client.C18PacketSpectate;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class MultiAura {
private static Timer timer = new Timer();
public static List<EntityLivingBase> targets = new ArrayList<>();
private static int index = 0;
private static Timer t = new Timer();
private static final Random RANDOM_NUMBER_GENERATOR = new Random();
private static int targetIndex;
public static boolean chance(int percent) {
return RANDOM_NUMBER_GENERATOR.nextInt(100) <= percent;
}
public static void doUpdate(final Aura aura, final UpdateEvent e, final Minecraft mc) {
double range = aura.getDouble("Range");
final int blockPercentage = aura.getDouble("Block Chance").intValue();
final boolean teams = false;
final List<EntityLivingBase> targets = CombatUtil.getTargets(teams, 100, false, true, range, true);
final boolean autoBlock = aura.getBool("Auto Block");
final long clickSpeed = aura.getDouble("Click Speed").longValue();
Aura.isBlocking = chance(blockPercentage) && mc.thePlayer.getHeldItem() != null && mc.thePlayer.getHeldItem().getItem() instanceof ItemSword
&& autoBlock && CombatUtil.canBlock(teams, false, true, range + 4.0, true);
if (Aura.isBlocking) {
if (e.isPost()) {
mc.thePlayer.setItemInUse(mc.thePlayer.getHeldItem(), 140);
mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
} else {
mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(
C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.UP));
}
}
if (!targets.isEmpty()) {
if (targetIndex >= targets.size()) {
targetIndex = 0;
}
Aura.currentEntity = targets.get(0);
float[] rots = RotationUtils.getRotations(targets.get(targetIndex));
e.setYaw(rots[0]);
e.setPitch(rots[1]);
}
else {
targetIndex = 0;
Aura.currentEntity = null;
}
if (e.isPost()) {
return;
}
if (!timer.delay(1000L / clickSpeed)) {
return;
}
for (final Entity entity : targets) {
PacketUtil.sendPacketSilent(new C18PacketSpectate(CubeUtil.CUBECRAFT_UUID));
mc.thePlayer.swingItem();
mc.thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(entity, C02PacketUseEntity.Action.ATTACK));
}
++targetIndex;
timer.reset();
}
}
// NOTE (AI): MultiAura's doUpdate loop sends C18 with CubeUtil.CUBECRAFT_UUID before every attack packet while sweeping targets. CUBECRAFT_UUID is a fixed, non-existent UUID constant used across Memeware's movement and combat modules; the C18 send is the CubeCraft-specific component of the aura sequence. The C02 attack for each target follows immediately after.Send C18 with the CubeCraft UUID from movement modules as part of the CubeCraft fly/speed bypass.
Fly sends C18(CubeUtil.CUBECRAFT_UUID) at two points in its mode logic and Speed at one, all via sendPacketSilent, alongside the movement packets that carry the actual exploit.
Expose C18PacketSpectate to Lua scripts: the scripting packet wrapper maps the class to wire id 0x18 so Lua handlers can match outgoing spectate packets by id instead of by class reference.
LuaEventPacket wraps an EventPacket with a numeric packet id and a direction string ('out'/'in'). The static packetIds map hard-codes every serverbound play packet class to its wire id (the comment explains the map exists because obfuscation defeats reflection), C18PacketSpectate at 0x18. A script handler receives packet = 24, direction = 'out' and can drop or inject the C18 through the scripting event API.
// ===== FILE: November Recode 2.0, scripting/wrapper/event/LuaEventPacket.java =====
/* November.lol © 2023 */
package lol.november.scripting.wrapper.event;
import java.util.HashMap;
import java.util.Map;
import lol.november.listener.event.net.EventPacket;
import lol.november.protect.DontObfuscate;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.*;
/**
* @author Gavin
* @since 2.0.0
*/
@Getter
@Setter
@DontObfuscate
public class LuaEventPacket {
/**
* A map of each {@link Packet} to their id
*/
private static final Map<Class<? extends Packet<?>>, Integer> packetIds =
new HashMap<>();
static {
// you may ask: why not use reflection and just.. do a funny?
// obfuscation eventually happens so this aids has to happen
packetIds.put(C0APacketAnimation.class, 0x0A);
packetIds.put(C0BPacketEntityAction.class, 0x0B);
packetIds.put(C0CPacketInput.class, 0x0C);
packetIds.put(C0DPacketCloseWindow.class, 0x0D);
packetIds.put(C0EPacketClickWindow.class, 0x0E);
packetIds.put(C0FPacketConfirmTransaction.class, 0x0F);
packetIds.put(C00PacketKeepAlive.class, 0x00);
packetIds.put(C01PacketChatMessage.class, 0x01);
packetIds.put(C02PacketUseEntity.class, 0x02);
packetIds.put(C03PacketPlayer.class, 0x03);
packetIds.put(C03PacketPlayer.C04PacketPlayerPosition.class, 0x04);
packetIds.put(C03PacketPlayer.C05PacketPlayerLook.class, 0x05);
packetIds.put(C03PacketPlayer.C06PacketPlayerPosLook.class, 0x06);
packetIds.put(C07PacketPlayerDigging.class, 0x07);
packetIds.put(C08PacketPlayerBlockPlacement.class, 0x08);
packetIds.put(C09PacketHeldItemChange.class, 0x09);
packetIds.put(C10PacketCreativeInventoryAction.class, 0x10);
packetIds.put(C11PacketEnchantItem.class, 0x11);
packetIds.put(C12PacketUpdateSign.class, 0x12);
packetIds.put(C13PacketPlayerAbilities.class, 0x13);
packetIds.put(C14PacketTabComplete.class, 0x14);
packetIds.put(C15PacketClientSettings.class, 0x15);
packetIds.put(C16PacketClientStatus.class, 0x16);
packetIds.put(C17PacketCustomPayload.class, 0x17);
packetIds.put(C18PacketSpectate.class, 0x18);
packetIds.put(C19PacketResourcePackStatus.class, 0x19);
}
private final int packet;
private final String direction;
public LuaEventPacket(EventPacket event) {
packet = packetIds.getOrDefault(event.get().getClass(), -1);
direction = event.get() instanceof EventPacket.Out ? "out" : "in";
}
}
// NOTE (AI): The map is the only C18 reference in November Recode 2.0. Scripts get the packet as (id 0x18, direction 'out'); the class-to-id table is maintained by hand because the client is obfuscated. This is the scripting-API counterpart to Rise's Java-side spectate spam: same packet, different access layer.anticheat Anti-Cheat Checks
The spectate packet teleports the client camera to an entity UUID, so anticheats see it as an interact-adjacent stream. Grim folds it into MultiInteractA and SelfInteract (an interaction with another entity, or with self), and Artemis flags it outside spectator gamemode as a disabler attempt. The rest of the corpus is packet registrations and Grim's SpectateManager plumbing.
Count spectate-entity packets as interactions so multi-target aura cannot hide behind camera teleports.
Treats SPECTATE_ENTITY exactly like INTERACT_ENTITY and ATTACK in the interaction tracker. If two different entities, or two different sneak states, are targeted within one tick, the check flags and cancels, buffering the flags while the player is allowed to skip ticks.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/combat/MultiInteractA.java =====
package ac.grim.grimac.checks.impl.combat;
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.PacketReceiveListener;
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.event.PacketReceiveEvent;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientAttack;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientInteractEntity;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientSpectateEntity;
import java.util.ArrayList;
@CheckData(name = "MultiInteractA", stableKey = "grim.multiinteract.multiple_targets", description = "Interacted with multiple entities in the same tick", experimental = true)
public class MultiInteractA extends Check implements PacketReceiveListener, PostPredictionListener {
private static final Verbose V =
Verbose.of("lastEntity={sint}, entity={sint}, lastSneaking={bool}, sneaking={bool}");
private final ArrayList<FlagData> flags = new ArrayList<>();
private int lastEntity;
private boolean lastSneaking;
private boolean hasInteracted = false;
public MultiInteractA(final GrimPlayer player) {
super(player);
}
@Override
public void onPacketReceive(PacketReceiveEvent event) {
if (event.getPacketType() == PacketType.Play.Client.INTERACT_ENTITY) {
WrapperPlayClientInteractEntity packet = new WrapperPlayClientInteractEntity(event);
int entity = packet.getEntityId();
boolean sneaking = packet.isSneaking().orElse(false);
onInteract(event, entity, sneaking);
}
if (event.getPacketType() == PacketType.Play.Client.ATTACK) {
WrapperPlayClientAttack packet = new WrapperPlayClientAttack(event);
onInteract(event, packet.getEntityId(), lastSneaking);
}
if (event.getPacketType() == PacketType.Play.Client.SPECTATE_ENTITY) {
WrapperPlayClientSpectateEntity packet = new WrapperPlayClientSpectateEntity(event);
onInteract(event, packet.getEntityId(), lastSneaking);
}
if (!player.cameraEntity.isSelf() || isTickPacket(event.getPacketType())) {
hasInteracted = false;
}
}
private void onInteract(PacketReceiveEvent event, int entity, boolean sneaking) {
if (hasInteracted && (entity != lastEntity || sneaking != lastSneaking)) {
if (!player.canSkipTicks()) {
if (flag(V.write(verbose()).sint(lastEntity).sint(entity).bool(lastSneaking).bool(sneaking)) && shouldModifyPackets()) {
event.setCancelled(true);
player.onPacketCancel();
}
} else {
flags.add(new FlagData(lastEntity, entity, lastSneaking, sneaking));
}
}
lastEntity = entity;
lastSneaking = sneaking;
hasInteracted = true;
}
@Override
public void onPredictionComplete(PredictionComplete predictionComplete) {
if (!player.canSkipTicks()) return;
if (player.isTickingReliablyFor(3)) {
for (FlagData data : flags) {
flag(V.write(verbose()).sint(data.lastEntity()).sint(data.entity()).bool(data.lastSneaking()).bool(data.sneaking()));
}
}
flags.clear();
}
private record FlagData(int lastEntity, int entity, boolean lastSneaking, boolean sneaking) {}
}
// NOTE (AI): Spectate is treated as an interaction because a client that spectates an entity and attacks it in the same tick is abusing the camera teleport, which is how multi-aura modules chain targets.Instantly ban spectating your own entity.
On SPECTATE_ENTITY (and also INTERACT_ENTITY and ATTACK), if the camera is on the player's own entity and the target resolves to the player's own entity id, the check cancels the packet and flags as an instant ban.
// ===== FILE: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/combat/SelfInteract.java =====
package ac.grim.grimac.checks.impl.combat;
import ac.grim.grimac.checks.Check;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.type.PreViaPacketReceiveListener;
import ac.grim.grimac.player.GrimPlayer;
import com.github.retrooper.packetevents.event.PacketReceiveEvent;
import com.github.retrooper.packetevents.protocol.packettype.PacketType;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientAttack;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientInteractEntity;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientSpectateEntity;
@CheckData(name = "SelfInteract", stableKey = "grim.badpackets.self_hit", description = "Interacted with self")
public class SelfInteract extends Check implements PreViaPacketReceiveListener {
public SelfInteract(GrimPlayer player) {
super(player);
}
@Override
public void onPreViaPacketReceive(PacketReceiveEvent event) {
if (event.getPacketType() == PacketType.Play.Client.INTERACT_ENTITY) {
WrapperPlayClientInteractEntity packet = new WrapperPlayClientInteractEntity(event);
onInteract(event, packet.getEntityId());
}
if (event.getPacketType() == PacketType.Play.Client.ATTACK) {
WrapperPlayClientAttack packet = new WrapperPlayClientAttack(event);
onInteract(event, packet.getEntityId());
}
if (event.getPacketType() == PacketType.Play.Client.SPECTATE_ENTITY) {
WrapperPlayClientSpectateEntity packet = new WrapperPlayClientSpectateEntity(event);
onInteract(event, packet.getEntityId());
}
}
// TODO: should check for camera entity id instead of player entity id?
private void onInteract(PacketReceiveEvent event, int entityId) {
if (player.cameraEntity.isSelf() && entityId == player.entityID
&& flag() && shouldModifyPackets()) { // Instant ban
event.setCancelled(true);
player.onPacketCancel();
}
}
}
// NOTE (AI): The check uses the player's entity id rather than the camera entity id, which the source flags as a possible edge case for camera-based spectating.Flag spectate packets sent outside spectator gamemode as a disabler attempt.
Listens for GPacketPlayClientSpectate and logs the player's gamemode whenever the player is not exempt by GAMEMODE. Repeated logs feed the DISABLER check with a threshold of 3.
// ===== FILE: artemisac-artemis-minecraft-anticheat, ac.artemis.checks.regular/src/main/java/ac/artemis/checks/regular/v2/checks/impl/disabler/DisablerSpectate.java =====
package ac.artemis.checks.regular.v2.checks.impl.disabler;
import ac.artemis.core.v4.check.ArtemisCheck;
import ac.artemis.core.v4.check.PacketHandler;
import ac.artemis.core.v4.check.annotations.Check;
import ac.artemis.anticheat.api.check.type.Type;
import ac.artemis.core.v4.check.exempt.type.ExemptType;
import ac.artemis.core.v4.check.packet.PacketExcludable;
import ac.artemis.core.v4.check.settings.CheckInformation;
import ac.artemis.core.v4.data.PlayerData;
import ac.artemis.packet.spigot.wrappers.GPacket;
import cc.ghast.packet.wrapper.packet.play.client.GPacketPlayClientSpectate;
/**
* @author Ghast
* @since 05/07/2020
*/
@Check(type = Type.DISABLER, var = "SPT", threshold = 3)
public class DisablerSpectate extends ArtemisCheck implements PacketHandler, PacketExcludable {
public DisablerSpectate(PlayerData data, CheckInformation info) {
super(data, info);
this.setCompatiblePackets(GPacketPlayClientSpectate.class);
}
@Override
public void handle(final GPacket packet) {
final boolean invalid = this.isExempt(ExemptType.GAMEMODE);
if (invalid) return;
this.log("gamemode=" + data.getPlayer().getGameMode());
}
}
// NOTE (AI): The check relies on the vanilla rule that the server only processes spectate for gamemode 3, so any spectate packet elsewhere is already suspicious.Related Packets
Wiki Cross-Reference
The target entity does not need to be in the same dimension, and the player is respawned in the right world if needed; the packet is ignored when the entity cannot be found or is not loaded. The vanilla client only uses it to teleport to players but the server appears to accept any entity type.
MCP 1.8.9 C18PacketSpectate implements Packet
1.8.9 callers: PlayerMenuObject.func_178661_a sends new C18PacketSpectate (line 27): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/client/gui/spectator/PlayerMenuObject.java
Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.
Module Analyses Using C18PacketSpectate
Full source walkthroughs of the modules and anti-cheats that use this packet.