0x30 S30PacketWindowItems

Sends the full contents of an inventory window, all slots at once. Used for initial container opening and rejected transaction recovery.

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

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

inventorycontaineritem
Comprehensive 8/8

Fields

FieldTypeDescription
windowIdunsigned byteWindow ID (0 = player inventory)
itemsItemStack[]Array of all ItemStacks in the window, slot by slot

Wire Encoding

FieldTypeNotes
Window IDUnsigned Byte
CountshortNumber of slots
Slot DataArray of SlotAll ItemStacks

MCP References

MCPNetHandlerPlayClient.handleWindowItems()

Handler Interface

HNDINetHandlerPlayClient

Notes

For windowId=0, this updates the entire player inventory (45 slots: 9 hotbar + 36 main). For chests, this is sent immediately after S2DPacketOpenWindow. When a C0E click is rejected (S32 accepted=false), the server re-sends S30 to force the client to revert its inventory.

Vanilla Source

S30PacketWindowItems.java77 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 net.minecraft.item.ItemStack;
6
import net.minecraft.network.Packet;
7
import net.minecraft.network.PacketBuffer;
8
import net.minecraft.network.play.INetHandlerPlayClient;
9
10
public class S30PacketWindowItems implements Packet<INetHandlerPlayClient>
11
{
12
    private int windowId;
13
    private ItemStack[] itemStacks;
14
15
    public S30PacketWindowItems()
16
    {
17
    }
18
19
    public S30PacketWindowItems(int windowIdIn, List<ItemStack> p_i45186_2_)
20
    {
21
        this.windowId = windowIdIn;
22
        this.itemStacks = new ItemStack[p_i45186_2_.size()];
23
24
        for (int i = 0; i < this.itemStacks.length; ++i)
25
        {
26
            ItemStack itemstack = (ItemStack)p_i45186_2_.get(i);
27
            this.itemStacks[i] = itemstack == null ? null : itemstack.copy();
28
        }
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.windowId = buf.readUnsignedByte();
37
        int i = buf.readShort();
38
        this.itemStacks = new ItemStack[i];
39
40
        for (int j = 0; j < i; ++j)
41
        {
42
            this.itemStacks[j] = buf.readItemStackFromBuffer();
43
        }
44
    }
45
46
    /**
47
     * Writes the raw packet data to the data stream.
48
     */
49
    public void writePacketData(PacketBuffer buf) throws IOException
50
    {
51
        buf.writeByte(this.windowId);
52
        buf.writeShort(this.itemStacks.length);
53
54
        for (ItemStack itemstack : this.itemStacks)
55
        {
56
            buf.writeItemStackToBuffer(itemstack);
57
        }
58
    }
59
60
    /**
61
     * Passes this Packet on to the NetHandler for processing.
62
     */
63
    public void processPacket(INetHandlerPlayClient handler)
64
    {
65
        handler.handleWindowItems(this);
66
    }
67
68
    public int func_148911_c()
69
    {
70
        return this.windowId;
71
    }
72
73
    public ItemStack[] getItemStacks()
74
    {
75
        return this.itemStacks;
76
    }
77
}

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

Deep Dive

Role in the protocol

S30PacketWindowItems is the full-window sync packet: an unsigned byte window id, a short slot count, then every slot encoding in order. The server sends it when a container opens (right after S2D PacketOpenWindow), when the player joins or respawns, and as the recovery path when a click transaction is rejected (S32 accepted=false). It is the server's authoritative statement of window contents, and the client applies it wholesale, replacing the container's slot list.

Vanilla handling

NetHandlerPlayClient.handleWindowItems maps windowId 0 and the player inventory window to inventoryContainer and everything else to the open container, then overwrites every slot via putStacksInSlots. EntityPlayerMP.updateCraftingInventory (line 773) builds the list from inventorySlots and sends S30 on every full sync. Because the client trusts the dump completely, S30 is both the sync primitive and the revert mechanism: any client-side inventory manipulation is undone the moment the server decides to re-send.

Why clients touch it

Only Rise uses S30 as a module surface in the corpus. Rise 5.99 Stealer treats it as the go signal: gotItems flips true when the chest contents land, and the steal loop only starts clicking after that flag, with a randomized per-click delay and auto-close. Rise 5.99 Aura resets its blocking flag on S30, since a full window sync invalidates the client's assumption that the sword is still blocking. Rise 6.x AdaptiveRefreshRateComponent counts S30 among the significant packets that dirty the HUD cache.

Exploit surface

S30 is the correction mechanism that makes S2F cancellation a short-horizon trick: one rejected transaction and the server pushes a full dump that reverts any ghost slot. For stealers the ordering constraint is the exploit surface: clicking before S30, or after a rejected click, races the resync and produces the visible pattern (clicking a slot whose content the server already changed) that chest-stealer heuristics flag. The packet is also the largest inventory packet on the wire, so a server that rejects transactions in a loop can force repeated full dumps, a bandwidth tax with no client-side mitigation in the corpus.

Server-Side Handling

EntityPlayerMP.updateCraftingInventory (line 773) serializes the container's inventorySlots into a List and sends S30(windowId, list) on open, respawn, and after rejected clicks. NetHandlerPlayServer.processClickWindow validates the action number; on mismatch it calls updateCraftingInventory so the client receives a corrected dump. The client handler resolves the window by id (0 and the player window map to inventoryContainer, otherwise the open container) and overwrites all slots.

Protocol Analysis

Wire: unsigned byte windowId, short count, then count Slot encodings (short id, byte count, short damage, optional NBT). Slots are ordered container-first, then player inventory 9-35, then hotbar 0-8. The cursor is not included; it is synced separately by S2F(-1,-1). A chest open produces S2D then S30 back to back, which is why inventory modules gate on S30 instead of the GUI opening event: the screen renders before the server contents arrive.

Anti-Cheat Landscape

No anti-cheat measures S30 itself; it is authoritative recovery data. The heuristics that matter sit on the clicks around it: a stealer that fires before S30, or after a rejected transaction, clicks against stale content and produces the tell-tale sequence (C0E immediately followed by the server's S30 correction). Ghost-item exploits depend on S30 never arriving for the manipulated window, so cancel-happy modules trade durability: the longer the manipulation, the more likely a full dump reverts it.

implementation Implementation Cases

The full-window sync and the revert path for rejected clicks. Rise 5.99's Stealer uses it as the trigger to start clicking chests, Aura resets its block state on it, and Rise 6.x treats it as a HUD-significant packet. Every other client in the corpus reaches it only through the vanilla handler.

Stealer (Rise 5.99)

Chest stealer: use S30 as the sync gate, then click every whitelisted item with randomized delays and auto-close.

onPacketReceive: if the packet is S30, set gotItems = true. onRender2DEvent: while GuiChest is open, wait a randomized decidedTimer (between min and max delay settings), then scan chest.inventorySlots and windowClick(chest.windowId, i, 0, 1, player) on the first whitelisted item, resetting the timer; auto-close via closeScreen once gotItems or ticksInChest > 10. gotItems resets whenever the player leaves the chest.

Source: Rise 5.99, dev/rise/module/impl/player/Stealer.java

Vanilla hook: PacketReceiveEvent, Render2DEvent, PreMotionEvent, WorldChangedEvent.
The randomized per-click delay and whitelist are the anti-heuristic layer; the pattern (one click per delay, immediate close) is still the classic chest-stealer fingerprint.
Variations: None in the corpus; Rise 6.x does not ship a chest stealer that touches S30, only the HUD component.
Aura (Rise 5.99)

Reset the blocking state when a full window sync arrives.

onPacketReceive: if the packet is S30PacketWindowItems, blocking = false. The Hypixel block mode keeps a blocking flag while the sword is held up; a full window sync means the server corrected the inventory, so the client must drop its assumption that the block is still active.

Source: Rise 5.99, dev/rise/module/impl/combat/Aura.java

Vanilla hook: PacketReceiveEvent.
Purely a state resync; prevents false block states after inventory corrections. No anti-cheat signal.
Variations: None in the corpus; the file is 1145 lines of combat logic with this single S30 reference at line 190.
AdaptiveRefreshRateComponent (Rise 6.2.4, Rise 6.1.30)

HUD performance component: S30 is one of the significant packets that force a GuiIngameCache redraw.

PacketReceiveEvent: on S30, reset the StopWatch and mark the cache dirty so the next frame re-renders. Same component as the S2F entry; both packets are treated as inventory-significant events.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/component/impl/hud/AdaptiveRefreshRateComponent.java

Vanilla hook: PacketReceiveEvent, PreMotionEvent, Render2DEvent.
None; the component only observes the packet stream.
Variations: Identical file in 6.1.30.
PacketReceiveEvent everywhere. Stealer additionally hooks Render2DEvent for the click loop and auto-close; Aura only the receive event; the Rise 6.x component only the receive event plus PreMotion and Render2D for cache management.
Only Rise touches S30 outside vanilla in the corpus. Rise 5.99 has the gameplay modules (Stealer, Aura); Rise 6.x registers it in NetworkAPI for scripts and in AdaptiveRefreshRateComponent. Memeware, Nekoware, Sigma, Spicy and Tenacity 6.0 ship only the vanilla handler.

anticheat Anti-Cheat Checks

The window-items packet dumps the full contents of an inventory window, and for simulation anticheats it is the authoritative recovery data that resyncs the compensated inventory after rejected transactions or open-window changes. Grim consumes it in two places: the inventory mirror applies every server slot to its storage, and the entity replication listener uses window-id-0 dumps to detect held-item and offhand changes. Intave's nayoro stack models the same send as a WindowItemsEvent. No anticheat treats S30 as a detection surface on its own.

Window-items inventory sync (Grim) (GrimAnticheat-Grim)

Keep the compensated copy of the player inventory aligned with the server after every full window-items send.

CompensatedInventory is a Check that listens on both directions. On WINDOW_ITEMS it wraps the packet, marks each server slot as corrected in the inventory storage, and when the window id is 0 (the player inventory) forces the packet-inventory mode back on and syncs the slot list. It tracks the open window id and the packet-sending inventory size, and falls back to the platform inventory for held item, offhand and armor reads when the packet stream is unsupported (modded menus).

Detects: Slot desync between the client's claimed inventory and the server's authoritative dump. The mirror is the basis for inventory-aware checks such as NoSlow and item-use validation.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/utils/latency/CompensatedInventory.java

Variations: PacketEntityReplication in the same repo consumes window-id-0 dumps to reset item-use state, and Artemis registers the packet in its repository (PacketPlayServerWindowItems) with a wrapper interface but no check logic.
Window-items event (Intave) (intave-intave)

Model the server's window-items send as a typed nayoro event so Intave's inventory tracking can react to full window dumps.

WindowItemsEvent carries the window id, the slot count, and a map of slot to item. It is one of the event types dispatched through the nayoro EventSink visitor, and the protocol layer registers it in the event registry. The class also handles item serialization for the nayoro wire format.

Detects: None directly: it is event plumbing that mirrors server inventory state into the monitoring stack that backs Intave's inventory and movement checks.

Source: intave-intave, src/main/java/de/jpx3/intave/module/nayoro/event/WindowItemsEvent.java

Variations: The only other named reference is Negativity's PacketType enum, which lists WINDOW_ITEMS as a clientbound constant; it is not consumed by any Negativity check.

Wiki Cross-Reference

Clientbound 0x30: unsigned byte windowId, short slot count, then ItemStack per slot.

Window 0 dumps player inventory; container dump follows S2D open back to back.

Also sent as recovery when a C0E click is rejected, forcing client to revert slots.

MCP 1.8.9 S30PacketWindowItems implements Packet dispatching to INetHandlerPlayClient.handleWindowItems; wire serde is readPacketData/writePacketData via readItemStackFromBuffer, readShort, readUnsignedByte.

1.8.9 callers: EntityPlayerMP.updateCraftingInventory sends new S30PacketWindowItems (line 875): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/player/EntityPlayerMP.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 S30PacketWindowItems

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