0x11 S11PacketSpawnExperienceOrb

Spawns an experience orb entity with position and XP value.

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

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

entityspawnxp
Comprehensive 7/8

Fields

FieldTypeDescription
entityIdVarIntEntity ID
x/y/zfixed-point intPosition × 32
xpValueshortExperience point value

Wire Encoding

FieldTypeNotes
Entity IDVarInt
XIntx*32
YInty*32
ZIntz*32
CountshortXP value

MCP References

MCPNetHandlerPlayClient.handleSpawnExperienceOrb()

Handler Interface

HNDINetHandlerPlayClient

Vanilla Source

S11PacketSpawnExperienceOrb.java87 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.entity.item.EntityXPOrb;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayClient;
8
import net.minecraft.util.MathHelper;
9
10
public class S11PacketSpawnExperienceOrb implements Packet<INetHandlerPlayClient>
11
{
12
    private int entityID;
13
    private int posX;
14
    private int posY;
15
    private int posZ;
16
    private int xpValue;
17
18
    public S11PacketSpawnExperienceOrb()
19
    {
20
    }
21
22
    public S11PacketSpawnExperienceOrb(EntityXPOrb xpOrb)
23
    {
24
        this.entityID = xpOrb.getEntityId();
25
        this.posX = MathHelper.floor_double(xpOrb.posX * 32.0D);
26
        this.posY = MathHelper.floor_double(xpOrb.posY * 32.0D);
27
        this.posZ = MathHelper.floor_double(xpOrb.posZ * 32.0D);
28
        this.xpValue = xpOrb.getXpValue();
29
    }
30
31
    /**
32
     * Reads the raw packet data from the data stream.
33
     */
34
    public void readPacketData(PacketBuffer buf) throws IOException
35
    {
36
        this.entityID = buf.readVarIntFromBuffer();
37
        this.posX = buf.readInt();
38
        this.posY = buf.readInt();
39
        this.posZ = buf.readInt();
40
        this.xpValue = buf.readShort();
41
    }
42
43
    /**
44
     * Writes the raw packet data to the data stream.
45
     */
46
    public void writePacketData(PacketBuffer buf) throws IOException
47
    {
48
        buf.writeVarIntToBuffer(this.entityID);
49
        buf.writeInt(this.posX);
50
        buf.writeInt(this.posY);
51
        buf.writeInt(this.posZ);
52
        buf.writeShort(this.xpValue);
53
    }
54
55
    /**
56
     * Passes this Packet on to the NetHandler for processing.
57
     */
58
    public void processPacket(INetHandlerPlayClient handler)
59
    {
60
        handler.handleSpawnExperienceOrb(this);
61
    }
62
63
    public int getEntityID()
64
    {
65
        return this.entityID;
66
    }
67
68
    public int getX()
69
    {
70
        return this.posX;
71
    }
72
73
    public int getY()
74
    {
75
        return this.posY;
76
    }
77
78
    public int getZ()
79
    {
80
        return this.posZ;
81
    }
82
83
    public int getXPValue()
84
    {
85
        return this.xpValue;
86
    }
87
}

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

Deep Dive

Role in the protocol

Spawns experience orbs: entity id, fixed-point position (x32) and a short XP value. The server splits orb value at 2000 when an XP source drops, so a large experience drop produces several S11 packets instead of one huge orb. EntityTrackerEntry.getPacket emits it for EntityXPOrb. The packet is frequent on farming servers and essentially free of state: no rotation, no velocity, no metadata.

Vanilla handling

handleSpawnExperienceOrb creates an EntityXPOrb, sets its position and assigns the xpValue. The client's XP bar is driven by pickup events and S06 health/xp updates, not by this packet, so S11 has no visible effect beyond the floating orb entity. Server side, orb value splitting happens at drop time, so the value in the packet is already the split value.

Why clients touch it

Exactly one module in the corpus references S11: Tenacity 6.0 AntiExploit, which rate-limits orb spawns as a crash-exploit guard (two S11 packets within 1 ms increments a violation counter that cancels the second packet). No AutoFarm or XP-tracker module exists in the 8 clients: XP collection modules iterate EntityXPOrb instances in the world entity list rather than hooking spawn packets, mirroring how ESP treats every other spawn packet.

Exploit surface

The orb-flood: a hostile server or proxy streaming S11 at high rate creates hundreds of EntityXPOrb instances per second, each with its own render state, which is the classic XP-lag crash vector. Tenacity's 1 ms rate gate is the canonical mitigation. The xpValue short is unsigned server-side; values above 32767 wrap negative client-side, which makes the orb render but breaks pickup logic. Nothing here is flaggable by anti-cheats because the packet is clientbound and server-authored.

Server-Side Handling

EntityTrackerEntry.getPacket returns new S11PacketSpawnExperienceOrb((EntityXPOrb) trackedEntity) for tracked XP orbs, snapshotting the orb's value. The server splits any XP drop exceeding 2000 into multiple orbs before they are tracked, so each S11 carries a value at or below the split cap. The client handler creates the orb and assigns the value with no validation.

Protocol Analysis

VarInt entity id, three x32 position ints, then a short XP value. No rotations, velocity or metadata fields. Because the value is a signed short, values in the 32768-65535 range arrive negative; the vanilla client does not guard against it. The packet is emitted in bursts when an XP source is destroyed, which is what makes it a flood-exploit vector.

Anti-Cheat Landscape

Anti-cheats ignore S11 entirely: it is clientbound, cosmetic and cannot be influenced by the player. The relevant defense is client-side (Tenacity's rate gate) and server-side (spawn rate caps on XP sources). No bypass trade-off exists for this packet.

implementation Implementation Cases

Spawns experience orbs, one of the most frequent and least stateful clientbound packets. Only one corpus hit: Tenacity 6.0 AntiExploit rate-limits S11 as a crash-exploit guard. No XP tracker exists in the 8 clients because farming modules iterate EntityXPOrb instances in the world list instead of hooking spawn packets.

AntiExploit (Tenacity 6.0)

Rate-limit XP orb spawns and other clientbound floods so a hostile server cannot lag or crash the client.

A PacketReceiveEvent handler tracks the timestamp of the last S11. If a new one arrives within 1 ms, invalidExperience increments and the packet is cancelled on the second violation with a chat warning; a gap longer than 1 ms resets the counter. The same handler sanitizes resource pack URIs, S43 camera teleports, S2A particle floods, S27 explosion strength and S18 teleport coordinates.

Source: Tenacity 6.0, dev/tenacity/module/impl/misc/AntiExploit.java

Vanilla hook: PacketReceiveEvent (Tenacity's IEventListener bus).
Client-side exploit hardening, not an anti-cheat bypass: cancelling S11 removes orbs from the renderer, which a server can observe as missing orb pickups only if it tracks them, which vanilla does not.
Variations: No other client in the corpus touches S11. Tenacity's own PacketRate/anti-flood logic is folded into this single module.
PacketReceiveEvent is the only hook surface in the corpus, used by Tenacity 6.0 AntiExploit.
All clients except Tenacity 6.0 reference S11 only through bundled vanilla code; Rise additionally lists it in NetworkAPI's script packet registry.

anticheat Anti-Cheat Checks

The experience-orb spawn packet has zero hits in the 50-anticheat corpus: no anticheat references S11PacketSpawnExperienceOrb or its ProtocolLib name. The packet is clientbound, server-authored, and carries no player claim that a server-side check could validate. Anti-cheats ignore it entirely; the only defense that exists in the wider ecosystem is client-side rate limiting against server floods, which is outside the anticheat corpus.

Wiki Cross-Reference

VarInt entityId, three fixed-point ints decoded x/32, then a short XP count; no rotation, velocity or metadata fields.

Server splits drops above 2000 XP into multiple orbs, so big rewards arrive as bursts; classic orb-flood lag vector.

MCP 1.8.9 S11PacketSpawnExperienceOrb implements Packet dispatching to INetHandlerPlayClient.handleSpawnExperienceOrb; wire serde is readPacketData/writePacketData via readInt, readShort, readVarIntFromBuffer.

1.8.9 callers: EntityTrackerEntry.? sends new S11PacketSpawnExperienceOrb (line 627): 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.

Module Analyses Using S11PacketSpawnExperienceOrb

Full source walkthroughs of the modules and anti-cheats that use this packet.