0x09 S09PacketHeldItemChange
Server confirms the player's held item slot change (echo back of C09).
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| slotId | byte | Hotbar slot 0-8 |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Slot | byte | 0-8 |
MCP References
NetHandlerPlayClient.handleHeldItemChange()Handler Interface
INetHandlerPlayClientNotes
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 | |
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.
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.
// ===== FILE: Rise 6.1.30, com/alan/clients/component/impl/player/PingSpoofComponent.java =====
package com.alan.clients.component.impl.player;
import com.alan.clients.component.Component;
import com.alan.clients.event.CancellableEvent;
import com.alan.clients.event.Listener;
import com.alan.clients.event.annotations.EventLink;
import com.alan.clients.event.impl.motion.PostMotionEvent;
import com.alan.clients.event.impl.other.WorldChangeEvent;
import com.alan.clients.event.impl.packet.PacketReceiveEvent;
import com.alan.clients.event.impl.packet.PacketSendEvent;
import com.alan.clients.util.packet.PacketUtil;
import net.minecraft.client.gui.GuiDownloadTerrain;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.*;
import net.minecraft.network.play.server.*;
import net.minecraft.util.Tuple;
import rip.vantage.commons.util.time.StopWatch;
import java.util.Arrays;
import java.util.concurrent.ConcurrentLinkedQueue;
public final class PingSpoofComponent extends Component {
public static ConcurrentLinkedQueue<PacketUtil.TimedPacket> packets = new ConcurrentLinkedQueue<>();
static StopWatch enabledTimer = new StopWatch();
public static boolean enabled;
static long amount;
static Tuple<Class[], Boolean> regular = new Tuple<>(new Class[]{C0FPacketConfirmTransaction.class, C00PacketKeepAlive.class, S1CPacketEntityMetadata.class}, false);
static Tuple<Class[], Boolean> velocity = new Tuple<>(new Class[]{S12PacketEntityVelocity.class, S27PacketExplosion.class}, false);
static Tuple<Class[], Boolean> teleports = new Tuple<>(new Class[]{S08PacketPlayerPosLook.class, S39PacketPlayerAbilities.class, S09PacketHeldItemChange.class}, false);
static Tuple<Class[], Boolean> players = new Tuple<>(new Class[]{S13PacketDestroyEntities.class, S14PacketEntity.class, S14PacketEntity.S16PacketEntityLook.class, S14PacketEntity.S15PacketEntityRelMove.class, S14PacketEntity.S17PacketEntityLookMove.class, S18PacketEntityTeleport.class, S20PacketEntityProperties.class, S19PacketEntityHeadLook.class}, false);
static Tuple<Class[], Boolean> blink = new Tuple<>(new Class[]{C02PacketUseEntity.class, C0DPacketCloseWindow.class, C0EPacketClickWindow.class, C0CPacketInput.class, C0BPacketEntityAction.class, C08PacketPlayerBlockPlacement.class, C07PacketPlayerDigging.class, C09PacketHeldItemChange.class, C13PacketPlayerAbilities.class, C15PacketClientSettings.class, C16PacketClientStatus.class, C17PacketCustomPayload.class, C18PacketSpectate.class, C19PacketResourcePackStatus.class, C03PacketPlayer.class, C03PacketPlayer.C04PacketPlayerPosition.class, C03PacketPlayer.C05PacketPlayerLook.class, C03PacketPlayer.C06PacketPlayerPosLook.class, C0APacketAnimation.class}, false);
static Tuple<Class[], Boolean> movement = new Tuple<>(new Class[]{C03PacketPlayer.class, C03PacketPlayer.C04PacketPlayerPosition.class, C03PacketPlayer.C05PacketPlayerLook.class, C03PacketPlayer.C06PacketPlayerPosLook.class}, false);
public static Tuple<Class[], Boolean>[] types = new Tuple[]{regular, velocity, teleports, players, blink, movement};
@EventLink
public final Listener<PacketSendEvent> send = event -> event.setCancelled(onPacket(event.getPacket(), event).isCancelled());
@EventLink
public final Listener<PacketReceiveEvent> receive = event -> event.setCancelled(onPacket(event.getPacket(), event).isCancelled());
public CancellableEvent onPacket(Packet<?> packet, CancellableEvent event) {
if (!event.isCancelled() && enabled && Arrays.stream(types).anyMatch(tuple -> tuple.getSecond() && Arrays.stream(tuple.getFirst()).anyMatch(regularpacket -> regularpacket == packet.getClass()))) {
event.setCancelled();
packets.add(new PacketUtil.TimedPacket(packet));
}
return event;
}
public static void dispatch() {
if (!packets.isEmpty()) {
// Stops the packets from being called twice
boolean enabled = PingSpoofComponent.enabled;
PingSpoofComponent.enabled = false;
packets.forEach(timedPacket -> PacketUtil.queue(timedPacket.getPacket()));
PingSpoofComponent.enabled = enabled;
packets.clear();
}
}
public static void disable() {
enabled = false;
enabledTimer.setMillis(enabledTimer.millis - 999999999);
}
@EventLink
public final Listener<WorldChangeEvent> onWorldChange = event -> dispatch();
@EventLink
public final Listener<PostMotionEvent> onPostMotion = event -> {
if (!(enabled = !enabledTimer.finished(100) && !(mc.currentScreen instanceof GuiDownloadTerrain))) {
dispatch();
} else {
// Stops the packets from being called twice
enabled = false;
packets.forEach(packet -> {
if (packet.getTime() + amount < System.currentTimeMillis()) {
PacketUtil.queue(packet.getPacket());
packets.remove(packet);
}
});
enabled = true;
}
};
public static void spoof(int amount, boolean regular, boolean velocity, boolean teleports, boolean players) {
spoof(amount, regular, velocity, teleports, players, false);
}
public static void spoof(int amount, boolean regular, boolean velocity, boolean teleports, boolean players, boolean blink, boolean movement) {
enabledTimer.reset();
PingSpoofComponent.regular.setSecond(regular);
PingSpoofComponent.velocity.setSecond(velocity);
PingSpoofComponent.teleports.setSecond(teleports);
PingSpoofComponent.players.setSecond(players);
PingSpoofComponent.blink.setSecond(blink);
PingSpoofComponent.movement.setSecond(movement);
PingSpoofComponent.amount = amount;
}
public static void spoof(int amount, boolean regular, boolean velocity, boolean teleports, boolean players, boolean blink) {
spoof(amount, regular, velocity, teleports, players, blink, false);
}
public static void blink() {
spoof(9999999, true, false, false, false, true);
}
}
// NOTE (AI): S09 lives in the teleports class tuple alongside S08 and S39. When a disabler arms spoof with teleports = true, any S09 arriving during the window is cancelled and parked in the timed queue like C00 and C0F, then released after the delay. The reasoning is ordering: S09 is the server echo of the held slot, and releasing a delayed slot change after the server already moved on desyncs the hotbar, so the component treats it as state that must be held and released atomically with the other buffered packets. The vanilla handler bounds-checks the slot to 0..8 before assigning inventory.currentItem, so a corrupt echo is silently ignored.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.
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.
// ===== FILE: November Recode 2.0, management/inventory/InventoryManager.java =====
/* November.lol © 2023 */
package lol.november.management.inventory;
import lol.november.November;
import lol.november.listener.bus.Listener;
import lol.november.listener.bus.Subscribe;
import lol.november.listener.event.net.EventPacket;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.C09PacketHeldItemChange;
import net.minecraft.network.play.server.S09PacketHeldItemChange;
/**
* @author Gavin
* @since 2.0.0
*/
public class InventoryManager {
/**
* The {@link Minecraft} game instance
*/
private final Minecraft mc = Minecraft.getMinecraft();
private int slot = -1;
public InventoryManager() {
November.bus().subscribe(this);
}
@Subscribe
private final Listener<EventPacket.Out> packetOut = event -> {
if (event.get() instanceof C09PacketHeldItemChange packet) {
slot = packet.getSlotId();
}
};
@Subscribe
private final Listener<EventPacket.In> packetIn = event -> {
if (event.get() instanceof S09PacketHeldItemChange packet) {
slot = packet.getHeldItemHotbarIndex();
}
};
public int slot() {
if (slot == -1) return slot = mc.thePlayer.inventory.currentItem;
return slot;
}
public void sync() {
if (slot != mc.thePlayer.inventory.currentItem) {
mc.thePlayer.sendQueue.addToSendQueue(
new C09PacketHeldItemChange(mc.thePlayer.inventory.currentItem)
);
}
}
public ItemStack itemStack() {
return mc.thePlayer.inventory.getStackInSlot(slot());
}
}
// NOTE (AI): The manager listens to both directions of the slot exchange: C09 records the client's request, S09 records the server's confirmation. Because the server bounds-checks and applies S09 to inventory.currentItem, the tracked slot is the server's view, which is what aura/autoclicker logic wants when it must not desync the hotbar. sync() is the silent-switch primitive: it only fires C09 when the local and tracked slots disagree.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.
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.
// ===== FILE: funkemunky-KauriV3, Anticheat/src/main/java/dev/brighten/ac/check/impl/packet/badpackets/SlotChange.java =====
package dev.brighten.ac.check.impl.packet.badpackets;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientHeldItemChange;
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerHeldItemChange;
import dev.brighten.ac.api.check.CheckType;
import dev.brighten.ac.check.Check;
import dev.brighten.ac.check.CheckData;
import dev.brighten.ac.check.WAction;
import dev.brighten.ac.data.APlayer;
import dev.brighten.ac.utils.annotation.Bind;
@CheckData(name = "SlotChange", checkId = "slotchange", description = "Detects invalid slot changes.", type = CheckType.BADPACKETS)
public class SlotChange extends Check {
public SlotChange(APlayer player) {
super(player);
}
private boolean didServerSlot = false;
private int lastSlot = -1, buffer;
private static final int BUFFER_MAX = 6;
@Bind
WAction<WrapperPlayClientHeldItemChange> heldItemSlot = packet -> {
if(didServerSlot) {
didServerSlot = false;
lastSlot = packet.getSlot();
return;
}
if(packet.getSlot() == lastSlot) {
if(++buffer > BUFFER_MAX) {
flag("Bad slot change detected at index %i", packet.getSlot());
}
debug("Invalid slot change detected! Slot: %i, buffer: %i/%i", packet.getSlot(), buffer, BUFFER_MAX);
} else if(buffer > 0) {
buffer = Math.max(buffer - 3, 0);
}
};
@Bind
WAction<WrapperPlayServerHeldItemChange> serverSlot = packet -> {
didServerSlot = true;
};
}
// NOTE (AI): The S09 half is the serverSlot action at lines 41-44; heldItemSlot (lines 23-39) is the C09 side this check was originally documented under. One file serves both packet entries.Related Packets
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
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.