0x0C S0CPacketSpawnPlayer

Spawns another player entity in the world with UUID, position (fixed-point int × 32), rotation (byte × 256/360), held item, and metadata.

Clientbound (Server → Client) · PLAY · net/minecraft/network/play/server/S0CPacketSpawnPlayer.java

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

playerentityspawn
Comprehensive 8/8

Fields

FieldTypeDescription
entityIdVarIntEntity ID for this player
playerIdUUIDPlayer UUID
x/y/zfixed-point intPosition × 32
yaw/pitchbyteRotation × 256/360
currentItemshortItem ID in hand
metadataDataWatcherPlayer metadata (skin, cape, etc.)

Wire Encoding

FieldTypeNotes
Entity IDVarInt
Player UUIDUUIDMost Sig + Least Sig bits
XIntx * 32
YInty * 32
ZIntz * 32
Yawbyteyaw * 256 / 360
Pitchbytepitch * 256 / 360
Current ItemshortBlock/item ID (0 = empty)
MetadataDataWatcherEntity data watcher

MCP References

MCPNetHandlerPlayClient.handleSpawnPlayer()

Handler Interface

HNDINetHandlerPlayClient

Notes

This is received when another player enters the client's render distance. ESP modules add the entity to their target list. AntiBot modules check the UUID against tab list entries.

Vanilla Source

S0CPacketSpawnPlayer.java135 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import java.util.List;
5
import java.util.UUID;
6
import net.minecraft.entity.DataWatcher;
7
import net.minecraft.entity.player.EntityPlayer;
8
import net.minecraft.item.Item;
9
import net.minecraft.item.ItemStack;
10
import net.minecraft.network.Packet;
11
import net.minecraft.network.PacketBuffer;
12
import net.minecraft.network.play.INetHandlerPlayClient;
13
import net.minecraft.util.MathHelper;
14
15
public class S0CPacketSpawnPlayer implements Packet<INetHandlerPlayClient>
16
{
17
    private int entityId;
18
    private UUID playerId;
19
    private int x;
20
    private int y;
21
    private int z;
22
    private byte yaw;
23
    private byte pitch;
24
    private int currentItem;
25
    private DataWatcher watcher;
26
    private List<DataWatcher.WatchableObject> field_148958_j;
27
28
    public S0CPacketSpawnPlayer()
29
    {
30
    }
31
32
    public S0CPacketSpawnPlayer(EntityPlayer player)
33
    {
34
        this.entityId = player.getEntityId();
35
        this.playerId = player.getGameProfile().getId();
36
        this.x = MathHelper.floor_double(player.posX * 32.0D);
37
        this.y = MathHelper.floor_double(player.posY * 32.0D);
38
        this.z = MathHelper.floor_double(player.posZ * 32.0D);
39
        this.yaw = (byte)((int)(player.rotationYaw * 256.0F / 360.0F));
40
        this.pitch = (byte)((int)(player.rotationPitch * 256.0F / 360.0F));
41
        ItemStack itemstack = player.inventory.getCurrentItem();
42
        this.currentItem = itemstack == null ? 0 : Item.getIdFromItem(itemstack.getItem());
43
        this.watcher = player.getDataWatcher();
44
    }
45
46
    /**
47
     * Reads the raw packet data from the data stream.
48
     */
49
    public void readPacketData(PacketBuffer buf) throws IOException
50
    {
51
        this.entityId = buf.readVarIntFromBuffer();
52
        this.playerId = buf.readUuid();
53
        this.x = buf.readInt();
54
        this.y = buf.readInt();
55
        this.z = buf.readInt();
56
        this.yaw = buf.readByte();
57
        this.pitch = buf.readByte();
58
        this.currentItem = buf.readShort();
59
        this.field_148958_j = DataWatcher.readWatchedListFromPacketBuffer(buf);
60
    }
61
62
    /**
63
     * Writes the raw packet data to the data stream.
64
     */
65
    public void writePacketData(PacketBuffer buf) throws IOException
66
    {
67
        buf.writeVarIntToBuffer(this.entityId);
68
        buf.writeUuid(this.playerId);
69
        buf.writeInt(this.x);
70
        buf.writeInt(this.y);
71
        buf.writeInt(this.z);
72
        buf.writeByte(this.yaw);
73
        buf.writeByte(this.pitch);
74
        buf.writeShort(this.currentItem);
75
        this.watcher.writeTo(buf);
76
    }
77
78
    /**
79
     * Passes this Packet on to the NetHandler for processing.
80
     */
81
    public void processPacket(INetHandlerPlayClient handler)
82
    {
83
        handler.handleSpawnPlayer(this);
84
    }
85
86
    public List<DataWatcher.WatchableObject> func_148944_c()
87
    {
88
        if (this.field_148958_j == null)
89
        {
90
            this.field_148958_j = this.watcher.getAllWatched();
91
        }
92
93
        return this.field_148958_j;
94
    }
95
96
    public int getEntityID()
97
    {
98
        return this.entityId;
99
    }
100
101
    public UUID getPlayer()
102
    {
103
        return this.playerId;
104
    }
105
106
    public int getX()
107
    {
108
        return this.x;
109
    }
110
111
    public int getY()
112
    {
113
        return this.y;
114
    }
115
116
    public int getZ()
117
    {
118
        return this.z;
119
    }
120
121
    public byte getYaw()
122
    {
123
        return this.yaw;
124
    }
125
126
    public byte getPitch()
127
    {
128
        return this.pitch;
129
    }
130
131
    public int getCurrentItemID()
132
    {
133
        return this.currentItem;
134
    }
135
}

Deobfuscated MCP 1.8.9 source of S0CPacketSpawnPlayer, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S0CPacketSpawnPlayer.java) at build time and verified present.

Deep Dive

Role in the protocol

S0C spawns a player entity: VarInt entity id, UUID, fixed-point x/y/z as ints scaled by 32, byte yaw and pitch scaled by 256/360, a short current-item id, then the DataWatcher metadata. EntityTrackerEntry constructs it when a player enters render distance. The client builds an EntityOtherPlayerMP from it. MessageSerializer carries a no-op special case for S0C in the bundled 1.8 sources, a decompile artifact of the 1.7.x-era encoding special case.

Vanilla handling

NetHandlerPlayClient.handleSpawnPlayer decodes the fixed-point coordinates, reads the metadata and registers the entity in the world. From then on the entity is driven by S14 relative moves and S18 teleports. ESP and nametag modules do not hook S0C in these clients: they iterate the world entity list, which is why S0C only shows up in anti-bot and meme modules.

Why clients touch it

S0C is the only packet that announces a new player with a position, which makes it the anti-bot veto point. Spicy's Antibot cancels the packet outright when the spawn looks like a bot (within 17 blocks, more than 1 block above the player, not at the player's coordinates) on non-Hypixel servers; the Hypixel branch is commented out because Hypixel bots carry plausible spawn data, so bots are removed from the entity list per-tick instead. Sigma 4.11 AntiBot inspects spawn packets the same way. The Spicy meme modules (DougDimmadome, FloofyFoxes, Furries) import S0C for skin and model replacement but ship empty handlers. November Recode 2.0's AntiBotModule adds a WATCHDOG mode that treats every player spawn following a detected bot despawn as a bot, printing a suspicious-spawn notice.

Exploit surface

Cancelling S0C is client-only: the server keeps simulating the bot, but the local world never receives the entity, so aim and ESP never lock onto it. The risk is entity-id desync if later packets reference the cancelled id, which vanilla guards by simply not spawning the entity. Anti-cheats do not measure S0C; anti-bot heuristics are purely client-side (spawn position relative to the player, invisibility plus name quirks, tab-list absence), and servers that want bots to survive these filters just spawn them with realistic positions, which is exactly what Hypixel does.

Server-Side Handling

EntityTrackerEntry.getPacket constructs S0C from the tracked EntityPlayer with x, y and z scaled by 32, yaw and pitch scaled by 256/360, the held item id as a short, and the DataWatcher data. The server does no per-recipient filtering beyond the tracker's render-distance logic.

Protocol Analysis

Fields: VarInt entity id, UUID (most and least significant longs), three ints scaled by 32, two bytes scaled by 256/360, a short item id (0 when empty), then DataWatcher metadata. The scaling is why the client divides by 32 and multiplies by 360/256. S0C is the only spawn packet with a UUID, which is what makes it the natural hook for anti-bot and name-based filtering.

Anti-Cheat Landscape

No anti-cheat reads S0C. The client-side heuristics in Spicy (17-block range, height above the player, non-coincident coordinates) and the Hypixel per-tick removal (invisibility, name formatting, tab-list absence, Watchdog naming) are the whole anti-bot landscape in this corpus, and servers defeat them by making spawn data indistinguishable from real players.

implementation Implementation Cases

The player-spawn announcement: fixed-point position, byte rotations, item id and metadata. In this corpus it is the anti-bot veto point: Spicy cancels suspicious spawns outright, Sigma inspects them, November Recode 2.0 flags post-despawn spawns in WATCHDOG mode, while the meme modules only import it. ESP and nametag modules never touch S0C because they iterate the entity list instead.

AntiBot (Sigma 4.11, Spicy, November Recode 2.0)

Veto bots at the spawn point: cancel S0C for suspicious spawns so the entity never enters the local world and cannot be targeted.

Spicy hooks EventPacket pre: on non-Hypixel servers, a spawn within 17 blocks, more than 1 block above the player and not at the player's exact coordinates is cancelled with a chat notice; on Hypixel the packet path is commented out and hypixelAntibot() removes bots from the entity list per-tick using invisibility, name formatting, tab-list absence and Watchdog naming heuristics. Sigma inspects incoming S0C the same way on its own packet bus.

Source: Spicy - info/spicyclient/modules/combat/Antibot.java

Vanilla hook: EventPacket (pre, incoming); EventUpdate for the per-tick Hypixel removal.
Cancelling the spawn is invisible to the server and to anti-cheats; the visible effect is that legitimate players matching the heuristic vanish too, which is the trade-off of position-based filtering.
Variations: Sigma 4.11 AntiBot reads S0C on EventPacket and filters on spawn data; Spicy splits the logic per server family and keeps the Hypixel path entity-list based. November Recode 2.0 ships the same role as AntiBotModule with WATCHDOG, TAB_TICKS and NPC modes; the WATCHDOG mode flags spawns that follow a detected bot despawn.
DougDimmadome / FloofyFoxes / Furries (entity overrides) (Spicy)

Meme-module family that imports S0C as the hook point for replacing spawned player models and skins; the shipped builds contain no handling.

All three modules import S0CPacketSpawnPlayer and define empty onEvent bodies. The import marks the intended integration point (hook player spawns, replace the entity render) but no spawn handling exists in the shipped files.

Source: Spicy - info/spicyclient/modules/memes/DougDimmadome.java

Vanilla hook: None in the shipped builds (import only).
No detection relevance: an unused import changes nothing on the wire.
Variations: Spicy also imports S0C in files/Account.java; the FloofyFoxes and Furries modules are the same empty family.
AntiBotModule (WATCHDOG spawn veto) (November Recode 2.0)

Flag player spawns that arrive after a detected bot despawned, so combat modules never target the replacement.

In WATCHDOG mode the module first scans the world entity list for invisible players missing from the tab list and picks one above the player as aboveEntityId. Once the S13 listener confirms that id was destroyed, the S0C branch of the same packet listener adds every new spawn to the bots set and prints a suspicious-spawn notice; other modules consult bot() before targeting.

Source: November Recode 2.0, feature/module/impl/combat/AntiBotModule.java

Vanilla hook: EventPacket.In (S0C and S13 branches), EventUpdate (entity list scan).
The veto is client-side only; the server never sees it. False positives are the cost: a legitimate player who respawns right after a bot despawn is blacklisted until the bots set is cleared on disable or the first five ticks after spawn.
Variations: Spicy cancels S0C outright and Sigma filters on spawn data; November instead records ids and lets KillAura-style modules skip them via bot().
EventPacket with pre and incoming checks on Spicy and Sigma; nothing else in the corpus hooks S0C at module level.
Spicy cancels the packet object (packet.setCanceled) inside a single EventPacket; Sigma reads spawn data on its EventPacket bus; Rise 6.x lists S0C only in the NetworkAPI script whitelist. November Recode 2.0 handles S0C inside AntiBotModule's EventPacket.In listener, gated on WATCHDOG mode.

anticheat Anti-Cheat Checks

The named-entity spawn packet is how server-side anticheats learn that another player exists and where. Reach, hitbox and killaura checks need this position anchor before the entity-update stream takes over, so every modern anticheat keeps an entity tracker keyed by spawn: Hydro and Tecnio insert a tracked entity into a map, Shard adds it to the compensated entity list and observes it for view sessions, and Grim replicates it into the simulation. The packet is never flagged; it is the insertion point that makes entity-distance checks possible. S0F (spawn mob) shares the same tracker files because living entities feed the same maps.

Spawn-player tracking (Hydro) (Incognitolol-Hydro)

Insert the spawned player into the tracked-entity map so reach and hitbox checks can measure against it.

EntityTracker.registerOutgoingPreHandler routes SPAWN_PLAYER to handleSpawnPlayer, which wraps the packet as WrapperPlayServerSpawnPlayer, reads the fixed-point position and stores a TrackedEntity keyed by entity id. S14 relative moves and S18 teleports then update the entry inside transaction confirmations, and DESTROY_ENTITIES removes it. Entity movement is interpolated only on flying packets, keeping the tracker transaction-accurate.

Detects: Nothing directly; it is the data layer. Reach checks and entity-distance queries (getDistanceToEntity, getClosestEntity, getEntitiesWithinDistance) consume the map.

Source: Incognitolol-Hydro, src/main/java/integral/studios/hydro/model/tracker/impl/EntityTracker.java

Variations: Tecnio's EntityTracker does the same with GPacketPlayServerSpawnNamedEntity and confirms the insertion on the connection tracker; Shard routes SPAWN_PLAYER into compensatedEntities.addEntity; Grim replicates the spawn into its compensated entity map with metadata and rotation.
Spawn-player view tracking (Shard) (KaelusAI-Shard)

Notify the view-session coordinator when a tracked player spawns so spectator-style tracking sessions stay in sync.

ViewTrackingObserver listens at MONITOR priority and, on SPAWN_PLAYER, resolves the spawned player's UUID, then schedules a synchronous task that checks isTrackableViewTarget and calls coordinator.trackTarget. It ignores the viewer's own spawn (targetId == viewer.uniqueId) and is a no-op when no session is active. DESTROY_ENTITIES is the matching removal path.

Detects: Nothing: this is session bookkeeping for the monitoring system, not a detection check.

Source: KaelusAI-Shard, src/main/kotlin/ac/shard/monitor/view/ViewTrackingObserver.kt

Variations: Shard's PacketListener also adds the entity to compensatedEntities on the same packet (handleSpawnPlayer), so the anticheat's simulation and its view sessions are fed by two different listeners over the same packet.
Named-entity spawn tracking (Tecnio) (Tecnio-AntiHaxerman)

Seed the entity tracker map with the spawned player's position inside a confirmed transaction.

EntityTracker.handle dispatches GPacketPlayServerSpawnNamedEntity to a connection-confirmed action: it builds a TrackerEntity from the wrapper's entity id and fixed-point coordinates, sets the position and puts it in trackerMap. S14 entity updates and S18 teleports mutate the entry under confirmation, and the map is interpolated on every flying packet in handlePost.

Detects: Nothing by itself; the tracker feeds the hitbox and reach checks.

Source: Tecnio-AntiHaxerman, src/main/java/me/tecnio/ahm/data/tracker/impl/EntityTracker.java

Variations: Hydro confirms spawns implicitly through its transaction tracker; Grim replicates metadata and rotations; Artemis ReachPreProcessor.attemptAdd is the same named-spawn insertion for its reach preprocessor.

Wiki Cross-Reference

If an entity with the same ID already exists on the client it is automatically deleted and replaced by the new entity.

MCP 1.8.9 S0CPacketSpawnPlayer implements Packet dispatching to INetHandlerPlayClient.handleSpawnPlayer; wire serde is readPacketData/writePacketData via readByte, readInt, readShort, readUuid, readVarIntFromBuffer.

1.8.9 callers: EntityTrackerEntry.createSpawnPacket sends new S0CPacketSpawnPlayer (line 501): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/EntityTrackerEntry.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.