0x09 S09PacketHeldItemChange

Server confirms the player's held item slot change (echo back of C09).

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

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

playerinventoryitem
Comprehensive 8/8

Fields

FieldTypeDescription
slotIdbyteHotbar slot 0-8

Wire Encoding

FieldTypeNotes
Slotbyte0-8

MCP References

MCPNetHandlerPlayClient.handleHeldItemChange()

Handler Interface

HNDINetHandlerPlayClient

Notes

This is the server echo of C09PacketHeldItemChange. The client uses this to stay in sync with the server on which hotbar slot is selected.

Vanilla Source

S09PacketHeldItemChange.java49 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayClient;
7
8
public class S09PacketHeldItemChange implements Packet<INetHandlerPlayClient>
9
{
10
    private int heldItemHotbarIndex;
11
12
    public S09PacketHeldItemChange()
13
    {
14
    }
15
16
    public S09PacketHeldItemChange(int hotbarIndexIn)
17
    {
18
        this.heldItemHotbarIndex = hotbarIndexIn;
19
    }
20
21
    /**
22
     * Reads the raw packet data from the data stream.
23
     */
24
    public void readPacketData(PacketBuffer buf) throws IOException
25
    {
26
        this.heldItemHotbarIndex = buf.readByte();
27
    }
28
29
    /**
30
     * Writes the raw packet data to the data stream.
31
     */
32
    public void writePacketData(PacketBuffer buf) throws IOException
33
    {
34
        buf.writeByte(this.heldItemHotbarIndex);
35
    }
36
37
    /**
38
     * Passes this Packet on to the NetHandler for processing.
39
     */
40
    public void processPacket(INetHandlerPlayClient handler)
41
    {
42
        handler.handleHeldItemChange(this);
43
    }
44
45
    public int getHeldItemHotbarIndex()
46
    {
47
        return this.heldItemHotbarIndex;
48
    }
49
}

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

Deep Dive

Role in the protocol

S09 is the server echo of the client's C09PacketHeldItemChange: one byte, the hotbar slot 0-8. ServerConfigurationManager sends it to a player on join (with the current slot) and on every accepted slot change, so client and server agree on the held item. It is a confirmation, not a command, which is why module interest is nearly zero: there is nothing to spoof, cancel or time.

Vanilla handling

NetHandlerPlayClient.handleHeldItemChange bounds-checks the slot (>= 0 and < InventoryPlayer.getHotbarSize()) and assigns inventory.currentItem. An out-of-range echo is silently ignored, so a corrupted slot value cannot desync the hotbar. The client's own C09 send path is separate: EntityPlayerSP switches slots locally and the server confirms with S09.

Why clients touch it

Three real references in the corpus. Rise 6.x PingSpoofComponent lists S09 in its teleports class tuple next to S08 and S39: when a disabler arms spoofing with the teleports tuple, S09 is intercepted and delayed like the stateful packets, because a slot echo released out of order desyncs the hotbar. Rise 5.99 Aura and Sigma 4.11 InventoryManager import S09 without handling it: both do silent slot switching on the C09 side and the import is dead in the shipped builds. November Recode 2.0's InventoryManager is the only live consumer: its packetIn listener stores the slot from S09 (and the packetOut listener stores the C09 request), and slot()/sync() expose the server-confirmed slot to modules.

Exploit surface

There is no exploit surface worth the name. Delaying S09 through PingSpoofComponent is the only manipulation in the corpus, and it is collateral of the C00/C0F buffering rather than a slot attack: the delay window is the same amount used for keepalive and transaction spoofing. Anti-cheats do not measure slot echoes, and no module in the 8 clients reads S09 to detect forced slot changes.

Server-Side Handling

ServerConfigurationManager sends S09 to the player on join (line 166 in the Memeware copy) and after every accepted C09 slot change (line 802), always with playerIn.inventory.currentItem. The server never validates the echoed value because the client is the source of truth for its own hotbar; the packet is purely informational.

Protocol Analysis

Single byte field, hotbar index 0-8. Sent in PLAY state, clientbound only. The pairing with C09 is asymmetric: C09 carries the requested slot, S09 confirms it, and the client applies the confirmation unconditionally within bounds. Because S09 is a broadcast to the player only, silent-switch modules depend on the server never echoing a slot they did not send.

Anti-Cheat Landscape

No anti-cheat measures S09. Slot-change rate is governed by the C09 side (inventory clicking and silent switch modules), and the echo adds nothing measurable. The only detection-adjacent use is PingSpoofComponent's ordering constraint: releasing a delayed S09 after the server already moved on would desync the hotbar visually, so the component holds and releases it with the buffered batch.

implementation Implementation Cases

The server echo of the held-slot change: one byte, bounded to 0-8, applied straight to inventory.currentItem. Module interest is minimal: only Rise's PingSpoofComponent treats S09 as state that must be buffered with the teleport class of packets, and the Aura and Sigma InventoryManager references are dead imports; November Recode 2.0's InventoryManager is the one client that consumes the echo, tracking the server-confirmed slot from both directions.

PingSpoofComponent (Rise 6.2.4, Rise 6.1.30)

Treat S09 as server state that must be held and released with the buffered keepalive and transaction batch when a disabler arms the teleports tuple.

The teleports tuple lists S08, S39 and S09. While enabled and the tuple is armed, any matching packet is cancelled on the receive event and parked in the timed queue, then released via PacketUtil.queue after the configured delay from PostMotionEvent.

Source: Rise 6.1.30 - com/alan/clients/component/impl/player/PingSpoofComponent.java

Vanilla hook: PacketReceiveEvent (cancel + park), PostMotionEvent (flush), WorldChangeEvent (dispatch).
Delaying a slot echo can visually desync the hotbar, but no anti-cheat reads it; the risk is cosmetic and only materializes if the delay outlives the next C09, which the component's ordering avoids by releasing the whole batch together.
Variations: Identical in 6.1.30 and 6.2.4; both arm the tuple through the same spoof() API used by the disabler suite.
Aura / InventoryManager (import-only) (Rise 5.99, Sigma 4.11)

Dead imports: both modules reference S09 in their source but contain no handling for it in the shipped builds.

Rise 5.99 Aura imports S09PacketHeldItemChange at line 44 with no other reference in the file; Sigma 4.11 InventoryManager imports it at line 31 with no other reference. Both clients perform silent slot switching on the C09 side, and the S09 import is a leftover from development rather than active code.

Source: Rise 5.99 - dev/rise/module/impl/combat/Aura.java; Sigma 4.11 - info/sigmaclient/module/impl/player/InventoryManager.java

Vanilla hook: None in the shipped builds (import only).
No detection relevance: an unused import changes nothing on the wire.
Variations: No other client in the corpus references S09 in module code at all.
InventoryManager (server slot sync) (November Recode 2.0)

Track the server-confirmed hotbar slot from both C09 (out) and S09 (in) and expose it to modules that need the authoritative held slot.

A packetOut listener stores the slot from C09PacketHeldItemChange; a packetIn listener stores the slot from S09PacketHeldItemChange.getHeldItemHotbarIndex(). slot() returns the tracked value, falling back to inventory.currentItem on first use; sync() re-sends C09 when the tracked slot diverges from currentItem. This is the only module in the corpus that reads the S09 echo for state, not just imports it.

Source: November Recode 2.0, management/inventory/InventoryManager.java

Vanilla hook: EventPacket.Out and EventPacket.In listeners subscribed on the November bus.
None: slot tracking is client-side bookkeeping. sync() only ever sends a C09 matching the player's real currentItem, so the wire traffic is indistinguishable from a normal slot switch.
Variations: Rise 5.99 Aura and Sigma 4.11 InventoryManager only import S09 with dead handlers; Rise 6.x PingSpoofComponent delays the echo as part of its teleports tuple; November Recode 2.0 is the only client that consumes the echo.
PacketReceiveEvent is the Rise 6.x hook surface (PingSpoofComponent handles S09 at component level before modules); November Recode 2.0 subscribes EventPacket.Out and EventPacket.In listeners in InventoryManager to track the slot.
Rise 6.x uses the component system with class-tuple matching. Memeware, Nekoware, Spicy and Tenacity have no module reference at all; their S09 corpus hits are vanilla NetHandlerPlayClient and ServerConfigurationManager files. November Recode 2.0 listens to both directions of the slot exchange (C09 out, S09 in) in InventoryManager and exposes the tracked slot through a management API.

anticheat Anti-Cheat Checks

The S09 corpus is dominated by the serverbound side: the grep terms collide with PacketPlayInHeldItemSlot (C09), so most hits are IN-side checks (Azure BadPacketsM, Frequency BadPacketsE/F and their forks, Grim BadPacketsA/Y, ThotPatrol BadPacketsC, Daedalus Crash, Artemis ProtocolG/BadPacketsP, Truthful BadPacketH, BetterAnticheat ImpossibleSlotCheck, Intave ToolSwitchHeuristic). The clientbound echo itself has exactly one check-class consumer: Kauri SlotChange reads WrapperPlayServerHeldItemChange and uses the confirmation to make the IN-side slot check trustworthy. Everything else on the OUT side is plumbing: FlopAC's WrappedOutHeldItemSlot and Artemis's GPacketPlayServerHeldItemSlot with the HardcodeMap registration.

SlotChange (Kauri) (funkemunky-KauriV3)

Two-way slot validator: the S09 server echo marks the slot change as confirmed so the next C09 with the same slot is not flagged, while C09 slot resends without a confirmation accumulate a buffer and flag.

SlotChange binds two actions. The serverSlot action fires on WrapperPlayServerHeldItemChange (S09) and sets didServerSlot. The heldItemSlot action fires on WrapperPlayClientHeldItemChange (C09): when didServerSlot is set it consumes the change and stores the slot, otherwise a same-slot resend pushes the buffer and flags "Bad slot change detected" past BUFFER_MAX = 6, decaying the buffer by 3 on legitimate changes.

Detects: Slot-change packet spam and invalid slot changes on the C09 side. The S09 confirmation is the state that prevents false positives after every legitimate server-confirmed switch.

Source: funkemunky-KauriV3, Anticheat/src/main/java/dev/brighten/ac/check/impl/packet/badpackets/SlotChange.java

Variations: No other anticheat reads the clientbound echo inside a check class. FlopAC ships the WrappedOutHeldItemSlot wrapper (SERVER HeldItemSlot constant) and Artemis registers PacketPlayServerItemHeldSlot in HardcodeMap with the GPacketPlayServerHeldItemSlot wrapper; both are routing plumbing, not checks. The C09-side checks in the corpus ignore the echo and key only off the inbound packet.

Wiki Cross-Reference

Single byte 0-8 confirming the held hotbar slot; server echo of C09 sent on join and every accepted switch.

Vanilla handler bounds-checks against hotbar size and ignores out-of-range values; silent-switch logic keys off C09, not this echo.

MCP 1.8.9 S09PacketHeldItemChange implements Packet dispatching to INetHandlerPlayClient.handleHeldItemChange; wire serde is readPacketData/writePacketData via readByte.

1.8.9 callers: ServerConfigurationManager.initializeConnectionToPlayer sends new S09PacketHeldItemChange (line 148): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/server/management/ServerConfigurationManager.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.