0x0E C0EPacketClickWindow

Player clicks in an inventory window. Handles item moves: pickup, shift-click, number key swap, middle click, drop, drag init, and double-click.

Serverbound (Client → Server) · PLAY · net/minecraft/network/play/client/C0EPacketClickWindow.java

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

playerinventorycontaineritem
Comprehensive 8/8

Fields

FieldTypeDescription
windowIdbyteContainer window ID
slotIdshortSlot index (-999=outside, -1=drop)
usedButtonbyteMouse button + shift modifier
actionNumbershortTransaction ID, incremented server-side
modebyte0=click, 1=shiftClick, 2=numKey, 3=midClick, 4=drop, 5=drag, 6=doubleClick
clickedItemItemStackItem in slot before the click

Wire Encoding

FieldTypeNotes
Window IDbyte0=player inv
Slotshort-999=outside window
Used Buttonbyte0=left, 1=right + shift
Action NumbershortTransaction counter
Modebyte0=click, 1=shiftClick, 2=numKey, 3=midClick, 4=drop, 5/6=drag
Clicked ItemSlotItemStack before click

MCP References

MCPNetHandlerPlayServer.processClickWindow()

Handler Interface

HNDINetHandlerPlayServer

Notes

The server validates every click against its own inventory state: actionNumber must match. If validation fails, S32PacketConfirmTransaction(accepted=false) reverts the client's inventory via S30PacketWindowItems. Almost NO module constructs C0E directly. They call mc.playerController.windowClick(), which sends C0E internally. Rise 6.0 BufferAbuseInventoryMove and RektSky B5 ChestStealer are exceptions that construct C0E directly.

Vanilla Source

C0EPacketClickWindow.java106 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.client;
2
3
import java.io.IOException;
4
import net.minecraft.item.ItemStack;
5
import net.minecraft.network.Packet;
6
import net.minecraft.network.PacketBuffer;
7
import net.minecraft.network.play.INetHandlerPlayServer;
8
9
public class C0EPacketClickWindow implements Packet<INetHandlerPlayServer>
10
{
11
    /** The id of the window which was clicked. 0 for player inventory. */
12
    private int windowId;
13
14
    /** Id of the clicked slot */
15
    private int slotId;
16
17
    /** Button used */
18
    private int usedButton;
19
20
    /** A unique number for the action, used for transaction handling */
21
    private short actionNumber;
22
23
    /** The item stack present in the slot */
24
    private ItemStack clickedItem;
25
26
    /** Inventory operation mode */
27
    private int mode;
28
29
    public C0EPacketClickWindow()
30
    {
31
    }
32
33
    public C0EPacketClickWindow(int windowId, int slotId, int usedButton, int mode, ItemStack clickedItem, short actionNumber)
34
    {
35
        this.windowId = windowId;
36
        this.slotId = slotId;
37
        this.usedButton = usedButton;
38
        this.clickedItem = clickedItem != null ? clickedItem.copy() : null;
39
        this.actionNumber = actionNumber;
40
        this.mode = mode;
41
    }
42
43
    /**
44
     * Passes this Packet on to the NetHandler for processing.
45
     */
46
    public void processPacket(INetHandlerPlayServer handler)
47
    {
48
        handler.processClickWindow(this);
49
    }
50
51
    /**
52
     * Reads the raw packet data from the data stream.
53
     */
54
    public void readPacketData(PacketBuffer buf) throws IOException
55
    {
56
        this.windowId = buf.readByte();
57
        this.slotId = buf.readShort();
58
        this.usedButton = buf.readByte();
59
        this.actionNumber = buf.readShort();
60
        this.mode = buf.readByte();
61
        this.clickedItem = buf.readItemStackFromBuffer();
62
    }
63
64
    /**
65
     * Writes the raw packet data to the data stream.
66
     */
67
    public void writePacketData(PacketBuffer buf) throws IOException
68
    {
69
        buf.writeByte(this.windowId);
70
        buf.writeShort(this.slotId);
71
        buf.writeByte(this.usedButton);
72
        buf.writeShort(this.actionNumber);
73
        buf.writeByte(this.mode);
74
        buf.writeItemStackToBuffer(this.clickedItem);
75
    }
76
77
    public int getWindowId()
78
    {
79
        return this.windowId;
80
    }
81
82
    public int getSlotId()
83
    {
84
        return this.slotId;
85
    }
86
87
    public int getUsedButton()
88
    {
89
        return this.usedButton;
90
    }
91
92
    public short getActionNumber()
93
    {
94
        return this.actionNumber;
95
    }
96
97
    public ItemStack getClickedItem()
98
    {
99
        return this.clickedItem;
100
    }
101
102
    public int getMode()
103
    {
104
        return this.mode;
105
    }
106
}

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

Deep Dive

Role in the protocol

C0E is the inventory click packet: windowId, slotId, usedButton, mode, clickedItem (the server's copy of the stack being clicked), and an action number. The server runs openContainer.slotClick and confirms with S32PacketConfirmTransaction only when the clicked-item copy matches; otherwise it re-sends the whole container. It is the only way to move items programmatically, so every inventory automation module funnels through it, either by constructing it directly or through PlayerControllerMP.windowClick.

Vanilla handling

processClickWindow verifies the window id matches the open container and that crafting is allowed, then runs slotClick(slotId, button, mode, player). If the returned stack equals packetIn.getClickedItem() it confirms with S32 (accepted = true) and resyncs; otherwise it stores the action number in a pending map, sends S32 accepted = false, and force-syncs the container. The windowId 0 check matters: clients must match the current window or the click is silently dropped.

Why clients touch it

In the 10-client corpus C0E is used by inventory managers (Sigma InventoryManager via PlayerControllerMP.windowClick), inventory-move modules (Rise 5.99 InvMove cancels and re-wraps C0E with C16+C0D), the Rise 6.2.4 BufferAbuseInventoryMove exploit (sends empty C0E packets to abuse the transaction buffer), captcha bots (Rise 5.99 Auto clicks the Redesky captcha item), and Tenacity NoSlowModule (clicks the armor slot to swap the held item). Note that ChestStealer and AutoArmor in this corpus route through C16 open-inventory status, not C0E clicks. LiquidSense Dev overwrites PlayerControllerMP.windowClick to fire a cancelable ClickWindowEvent before every C0E send, and November Recode 2.0 registers C0E in its Lua scripting packet-id map (0x0E) so scripts can observe and cancel it, but ships no click module of its own.

Exploit surface

The action number and clicked-item echo are the attack surface. Sending clicks with a stale or forged clickedItem makes the server resync the container, which some disablers use to flood the transaction pipeline. BufferAbuseInventoryMove exploits the server's transaction accounting by sending clicks the server must answer, delaying watchdog's transaction-based checks. The windowId mismatch is a silent drop, which InvMove uses to cancel clicks and re-send them under a fake open-inventory state. LiquidSense's windowClick overwrite computes the container transaction id and then discards it, sending (short) -1; the server never validates the action number against a counter, it only echoes it in the S32 reply, so the click confirms the same way a real id would and the client container counter is left stale.

Server-Side Handling

processClickWindow: windowId must equal openContainer.windowId and crafting must be allowed. slotClick mutates the container; on clickedItem match the server confirms (S32 true) and resyncs, on mismatch it stores the action number, sends S32 false, and force-syncs all slots. Crafting players get a full container resend instead of a click.

Protocol Analysis

Fields: windowId byte, slotId short, usedButton byte, mode byte, clickedItem (ItemStack or null), actionNumber short. Window 0 is the player inventory; chests start at 1. The clickedItem must be the exact stack the server last sent for that slot, which is why clients cache S2FPacketSetSlot/S30PacketWindowItems state.

Anti-Cheat Landscape

Anti-cheats track click rate and window state. Inventory move (clicking while moving) is detected by comparing C0E timing against movement packets; CancelInventoryMove in Rise 6.2.4 exists to cancel the C16 open-inventory status so the server never learns the inventory is open. Transaction flooding via C0E is a disabler vector against Watchdog, which uses transaction gaps to time its checks.

implementation Implementation Cases

The programmatic inventory click. Inventory managers click through it, InvMove re-wraps it, BufferAbuseInventoryMove floods it, and a captcha bot clicks with it. Its confirm/resync loop is what makes it both reliable for automation and exploitable for transaction flooding. LiquidSense Dev adds the ClickWindowEvent mixin that lets any module veto clicks, and November Recode 2.0 exposes the packet to Lua scripts.

InventoryManager (Sigma 4.11)

Automatically equip the best armor and tools by clicking the inventory container.

Sigma InventoryManager scans the container slots, computes protection/weapon scores, and performs shift-clicks and hotbar swaps through mc.playerController.windowClick, which internally constructs C0EPacketClickWindow with the current windowId and the next transaction id. The module guards against concurrent modules (e.g. AutoArmor yields when InventoryManager is on).

Source: Sigma 4.11, info/sigmaclient/module/impl/player/InventoryManager.java

Vanilla hook: EventTick-driven with a Timer; windowClick wraps C0E.
Inventory managers are low-risk; the detectable part is click speed and moving while the container is open, which anti-cheats measure per-window.
Variations: Only Sigma ships a C0E-referencing InventoryManager; Spicy's InventoryManager uses C09/C16 instead.
InvMove (packet re-wrap) (Rise 5.99)

Allow movement while an inventory GUI is open by re-sending clicks under a fake inventory-open state.

In packet mode, InvMove cancels C0DPacketCloseWindow and C0EPacketClickWindow, then replays the click preceded by a C16 OPEN_INVENTORY_ACHIEVEMENT status and followed by a C0DPacketCloseWindow, all via sendPacketWithoutEvent so the server sees a coherent open-click-close sequence while the player keeps moving.

Source: Rise 5.99, dev/rise/module/impl/movement/InvMove.java

Vanilla hook: PacketSendEvent; PreMotionEvent for movement input.
The re-wrap makes the server believe the inventory opened and closed cleanly, hiding the fact that clicks happened while the player moved. Watchdog and newer NCP track open/close sequences, which is why the C16/C0D pair must be exact.
Variations: Rise 6.2.4/6.1.30 ship CancelInventoryMove (cancels C16/C0B-OPEN_INVENTORY/C0D entirely) and BufferAbuseInventoryMove as separate modes.
BufferAbuseInventoryMove (Rise 6.2.4, Rise 6.1.30)

Abuse the server's transaction buffer by sending C0E clicks while the inventory is open, delaying watchdog's transaction-based movement checks.

Sends empty C0EPacketClickWindow packets (no-arg constructor) on a tick cycle while an inventory screen is open, and cancels legit C0E so the client's own clicks do not leak. The flood keeps the server's pending-transaction map busy so its confirm-based timing checks lag.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/movement/inventorymove/BufferAbuseInventoryMove.java

Vanilla hook: PreUpdateEvent + PacketSendEvent; PacketUtil.sendNoEvent.
The no-arg C0E has windowId 0 and null item, which vanilla processes as a click on the player inventory; anti-cheats that do not validate the click's item echo will process it and queue a transaction, inflating the buffer. Very detectable by servers that count clicks per window.
Variations: Rise 6.1.30 ships the same module; the WatchdogDisabler in 6.2.4 also watches C0E windowId to decide when to send C16 status.
Auto (Redesky captcha click) (Rise 5.99)

Automatically click the Redesky captcha item and send register/login commands on login.

Intercepts S2FPacketSetSlot; when a slot's item display name contains 'aqui', sends C0EPacketClickWindow(windowId, slotId, 0, 0, item, 1919) via the send queue, confirming the captcha. A companion register/login routine sends C01 chat commands on world join.

Source: Rise 5.99, dev/rise/module/impl/other/Auto.java

Vanilla hook: PacketReceiveEvent (S2FPacketSetSlot); PreMotionEvent for timing.
Server-specific bot; the captcha is designed to be clicked by humans, so the module just automates a UI action. No movement flags involved.
Variations: Unique to Rise 5.99 in this corpus.
NoSlowModule (armor-slot click) (Tenacity 6.0)

Bypass use-item slowdown by swapping the held item to an armor slot with a window click instead of a C08 use packet.

While using an item and not in a GUI, send C0DPacketCloseWindow(0) followed by C0EPacketClickWindow(0, 36 + currentItem, 0, 6, null, nextTransactionID). Mode 6 with button 0 swaps the held item into the armor slot, ending the use state server-side without the slowdown, then the item is swapped back. A 'Watchdog' mode toggles this per-AC.

Source: Tenacity 6.0, dev/tenacity/module/impl/movement/NoSlowModule.java

Vanilla hook: SlowDownEvent cancel + MotionEvent; PacketReceiveEvent to cancel S2F echoes.
The armor-swap click is an unusual pattern; servers that validate windowId 0 clicks against the open container accept it (window 0 is always the player inventory). Watchdog mode exists because the swap timing is AC-sensitive.
Variations: Only Tenacity uses the click-window variant; other clients use the C08 use form.
MixinPlayerControllerMP (ClickWindow event) (LiquidSense Dev)

Route every inventory click through a cancelable ClickWindowEvent before the C0E is queued, so LiquidBounce modules can veto or observe clicks.

@Overwrite of PlayerControllerMP.windowClick: build ClickWindowEvent, call it on the client event manager, return null if cancelled; otherwise run slotClick locally, then addToSendQueue(new C0EPacketClickWindow(windowId, slotId, mouseButtonClicked, mode, itemstack, (short) -1)). The computed getNextTransactionID value is discarded.

Source: LiquidSense Dev, net/ccbluex/liquidbounce/injection/forge/mixins/entity/MixinPlayerControllerMP.java

Vanilla hook: PlayerControllerMP.windowClick @Overwrite (mixin); ClickWindowEvent on the LiquidBounce event bus.
The hardcoded -1 action is echoed back in S32 unvalidated, so clicks confirm normally; the quirk only shows in the client's own container transaction counter going stale.
Variations: Click-cancel modules consume the same event; no other corpus client fires a pre-click event above the packet constructor.
PacketSendEvent (InvMove, BufferAbuse), PacketReceiveEvent (Auto, NoSlow), tick/update loops for click scheduling, PlayerControllerMP.windowClick in Sigma. LiquidSense Dev fires a cancelable ClickWindowEvent from its windowClick @Overwrite, which modules can veto before the C0E exists.
Sigma goes through playerController.windowClick. Rise 5.99 uses PacketUtil.sendPacketWithoutEvent to replay clicks. Rise 6.2.4 uses PacketUtil.sendNoEvent and EventLink listeners. Tenacity uses addToSendQueue directly. Spicy references C0E only inside CsgoSpinbot and YawAndPitchSpoof for packet-spoofing sequences, not for inventory automation. November Recode 2.0 registers C0E in the LuaEventPacket scripting id map (0x0E) so scripts can match and intercept it; LiquidSense Dev intercepts at the mixin layer, above the packet constructor.

anticheat Anti-Cheat Checks

The click window packet is the only inventory interaction the server sees: window id, slot, button, action number and the dragged item. Anticheats use it to police click cadence and protocol correctness (Frequency InventoryA, NCP InventoryListener with FastClick and Gutenberg), and to catch movement while an inventory is open, the inventory-move cheat domain (CheaterDeleter InventoryMoveCheck, Negativity InventoryMoveProtocol). Because the packet is also the acknowledgement channel for server transactions, it feeds NCP's window-click and frequency bookkeeping.

InventoryA (Frequency) (ElevatedDev-Frequency, MinecraftUserHAN1110-FrequencyPlus)

Classic statistical inventory-click check: legit clicks arrive with variable spacing, clicker clicks do not.

Samples the number of flying packets between WrappedPlayInWindowClick packets when fewer than 5 movements separate clicks and the player is not teleporting. At 5 samples it computes the standard deviation and outlier count; a deviation below 1 with zero outliers fails the check.

Detects: Inventory clickers and auto-totem/auto-armor modules that click slots at mechanically constant intervals.

Source: ElevatedDev-Frequency, src/main/java/xyz/elevated/frequency/check/impl/inventory/InventoryA.java

Variations: InventoryB in the same package adds delay-pattern scoring; Degrade's InventoryA and azure's InvTweaks checks use the same low-variance template.
InventoryMoveCheck (CheaterDeleter) (CoolMineman-CheaterDeleter)

Modern Fabric-side inventory-move check: position changes while a screen handler is open must agree with the player's velocity.

A CDModule listening to movement, packet and damage callbacks. While the current screen handler is open and the player is not flying or in a collision cluster, position-change packets are validated: vertical rises with downward velocity flag immediately, and horizontal deltas that grow from a zero-velocity baseline flag after the 500 ms grace window. Closing the screen or taking damage resets the deltas.

Detects: Inventory-move cheats that walk or sprint while the inventory is open, including ghost-inventory movement spoofing.

Source: CoolMineman-CheaterDeleter, src/main/java/io/github/coolmineman/cheaterdeleter/modules/movement/InventoryMoveCheck.java

Variations: CheaterDeleter's MovementModuleManager registers the check alongside SpeedCheck and PhaseCheck; Grim's CompensatedInventory and TickInventory simulate the same window state on the server.
InventoryMoveProtocol (Negativity) (Elikill58-Negativity)

Inventory-move scoring protocol: movement while an inventory is open is compared against the baseline captured at open time.

Arms on InventoryClickEvent and InventoryOpenEvent, then on PlayerMoveEvent accumulates an alert amount: starting to sprint or sneak since the inventory opened adds points, and covering distance at or beyond walk speed since open adds more. When the inventory has been open for 3 ticks and the amount exceeds 2, it alerts with a confidence based on time open.

Detects: Inventory-move cheats that sprint, sneak or walk while an inventory is open, and velocity desync during inventory use.

Source: Elikill58-Negativity, src/com/elikill58/negativity/spigot/protocols/InventoryMoveProtocol.java

Variations: Frequency's BadPacketsJ/M and Rammelkast's InventoryListener enforce the same no-movement-while-open rule on raw packets; Photon's InventoryMove module is the modern equivalent.
InventoryListener suite (NoCheatPlus) (Updated-NoCheatPlus-NoCheatPlus)

The canonical window-click check set: FastClick, InstantBow, Gutenberg, MoreInventory and Open, driven by inventory events and the click window packet.

A CheckListener registering the inventory checks with per-player config and data, fed from Bukkit inventory events and the ProtocolLib InventoryAdapter wrapping PacketPlayInWindowClick. FastClick limits clicks per window per second, InstantBow flags bows fired without a charging period, Gutenberg caps creative item spam, MoreInventory catches rapid item nuking, and Open limits how often windows can be reopened.

Detects: Inventory clickers, instant-bow cheats, creative item spam, inventory nuking and window-open cycling.

Source: Updated-NoCheatPlus-NoCheatPlus, NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java

Variations: AntiCheatPlus's InventoryListener and DynamicDev's InventoryListener expose the same fastclick idea on 1.7-1.8 servers; Frequency's InventoryA/B are the statistical descendants.

Wiki Cross-Reference

The server ignores any click targeting a window ID other than the currently open one, including window 0 while another window is open. Right-clicking an odd-sized stack picks up half and leaves the smaller half in the slot, and the mode and button fields jointly encode left, right, shift-click, number-key, drop-key, drag-painting and double-click operations with slot -999 meaning outside the window.

MCP 1.8.9 C0EPacketClickWindow implements Packet dispatching to INetHandlerPlayServer.processClickWindow; wire serde is readPacketData/writePacketData via readByte, readItemStackFromBuffer, readShort.

1.8.9 callers: PlayerControllerMP.windowClick sends new C0EPacketClickWindow (line 538): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/client/multiplayer/PlayerControllerMP.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.