0x18 C18PacketSpectate

Spectator mode player teleports to another entity or player by UUID. Only works in spectator gamemode (3).

Serverbound (Client → Server) · PLAY · net/minecraft/network/play/client/C18PacketSpectate.java

Published 2026-06-18 · Updated 2026-10-14

playerspectatorentityposition
Comprehensive 7/8

Fields

FieldTypeDescription
targetUUIDUUIDUUID of the entity to spectate/follow

Wire Encoding

FieldTypeNotes
Target UUIDUUIDUUID as two longs (most/least significant bits)

MCP References

MCPNetHandlerPlayServer.processSpectate()

Handler Interface

HNDINetHandlerPlayServer

Notes

Only processed by the server if the player is in spectator mode (gamemode=3). The server teleports the player's camera to the target entity's position. MultiAura modules (Aqua 13, Memeware 7.3) use C18 to teleport to targets for aura attack sequences.

Vanilla Source

C18PacketSpectate.java52 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.client;
2
3
import java.io.IOException;
4
import java.util.UUID;
5
import net.minecraft.entity.Entity;
6
import net.minecraft.network.Packet;
7
import net.minecraft.network.PacketBuffer;
8
import net.minecraft.network.play.INetHandlerPlayServer;
9
import net.minecraft.world.WorldServer;
10
11
public class C18PacketSpectate implements Packet<INetHandlerPlayServer>
12
{
13
    private UUID id;
14
15
    public C18PacketSpectate()
16
    {
17
    }
18
19
    public C18PacketSpectate(UUID id)
20
    {
21
        this.id = id;
22
    }
23
24
    /**
25
     * Reads the raw packet data from the data stream.
26
     */
27
    public void readPacketData(PacketBuffer buf) throws IOException
28
    {
29
        this.id = buf.readUuid();
30
    }
31
32
    /**
33
     * Writes the raw packet data to the data stream.
34
     */
35
    public void writePacketData(PacketBuffer buf) throws IOException
36
    {
37
        buf.writeUuid(this.id);
38
    }
39
40
    /**
41
     * Passes this Packet on to the NetHandler for processing.
42
     */
43
    public void processPacket(INetHandlerPlayServer handler)
44
    {
45
        handler.handleSpectate(this);
46
    }
47
48
    public Entity getEntity(WorldServer worldIn)
49
    {
50
        return worldIn.getEntityFromUuid(this.id);
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.

Disabler (spectate spam) (Rise 5.99)

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.

Source: Rise 5.99, dev/rise/module/impl/other/Disabler.java

Vanilla hook: onPreMotion (PreMotionEvent), onStrafe (StrafeEvent).
The random-UUID flood is visible to anti-cheats that count C18 from non-spectators; the own-UUID form is the stealth variant and the one Rise 6.x keeps.
Variations: Rise 6.x replaces this with the dedicated SpectateDisabler Mode; Tenacity's Criticals keeps the random-UUID C18 commented out.
SpectateDisabler (Rise 6.1.30, Rise 6.2.4)

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.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/exploit/disabler/SpectateDisabler.java

Vanilla hook: StrafeEvent.
Every strafe triggers a full cross-world lookup of the player's own UUID; the packet is a no-op state-wise for non-spectators, so detection is rate-based only.
Variations: Identical Mode in Rise 6.1.30.
MultiAura (Memeware 7.3)

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.

Source: Memeware 7.3, me/memewaredevs/client/module/combat/aura/MultiAura.java

Vanilla hook: UpdateEvent (via Aura).
The fixed UUID never resolves, so each attack carries a wasted lookup; on CubeCraft-era servers this was part of the attack desync, not a standalone flag.
Variations: Nekoware v1 private imports C18 in its own MultiAura/Fly/Speed but has no call sites in the mined corpus.
Fly / Speed (CubeCraft spectate) (Memeware 7.3)

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.

Source: Memeware 7.3, me/memewaredevs/client/module/movement/Fly.java; me/memewaredevs/client/module/movement/Speed.java

Vanilla hook: UpdateEvent / movement events.
Same fixed-UUID pattern as MultiAura; detection was network-specific and is obsolete on modern CubeCraft.
Variations: Nekoware v1 private mirrors the imports without usage; no other client uses C18 for movement.
LuaEventPacket (script API) (November Recode 2.0)

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.

Source: November Recode 2.0, scripting/wrapper/event/LuaEventPacket.java

Vanilla hook: EventPacket.Out on the November event bus, bridged into the Lua event wrapper.
None: the wrapper is read-only metadata. Scripts that spam C18 still incur the same server-side cross-world entity lookup as any other spectate flood, but the wrapper itself never touches the wire.
Variations: The only November Recode 2.0 touchpoint for C18 in the corpus; Rise 5.99 and Rise 6.x reach the packet from Java disabler modes (Disabler spectate spam, SpectateDisabler) instead of a scripting layer.
StrafeEvent (Rise 6.x), PreMotionEvent/StrafeEvent (Rise 5.99), UpdateEvent (Memeware); November Recode 2.0 exposes the packet to Lua scripts via LuaEventPacket (EventPacket.Out).
Rise 5.99 uses sendPacketWithoutEvent; Rise 6.x uses sendNoEvent; Memeware uses sendPacketSilent. PingSpoofComponent also holds C18 in its blink tuple in both Rise 6.x builds. November Recode 2.0 handles C18 only in the scripting layer: LuaEventPacket maps the class to id 0x18 for Lua handlers, with no Java module usage.

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.

MultiInteractA spectate (Grim) (GrimAnticheat-Grim)

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.

Detects: Multi-aura that teleports the camera between targets with spectate packets before attacking each one.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/combat/MultiInteractA.java

Variations: No other anticheat in the corpus folds spectate into an interact check; Artemis instead checks the gamemode (see below).
SelfInteract spectate (Grim) (GrimAnticheat-Grim)

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.

Detects: Clients that spectate themselves, a disabler and camera-aura primitive used to mess with the server's camera state.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/combat/SelfInteract.java

Variations: No other anticheat in the corpus checks self-spectate.
DisablerSpectate (Artemis) (artemisac-artemis-minecraft-anticheat)

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.

Detects: Players sending spectate packets in non-spectator gamemodes, which indicates a disabler trying to move the camera server-side.

Source: artemisac-artemis-minecraft-anticheat, ac.artemis.checks.regular/src/main/java/ac/artemis/checks/regular/v2/checks/impl/disabler/DisablerSpectate.java

Variations: Grim's SpectateManager and the Artemis wrapper classes are plumbing, not checks; this is the only corpus check that keys on the gamemode.

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 dispatching to INetHandlerPlayServer.handleSpectate; wire serde is readPacketData/writePacketData via readUuid.

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.