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.
Fields
| Field | Type | Description |
|---|---|---|
| windowId | byte | Container window ID |
| slotId | short | Slot index (-999=outside, -1=drop) |
| usedButton | byte | Mouse button + shift modifier |
| actionNumber | short | Transaction ID, incremented server-side |
| mode | byte | 0=click, 1=shiftClick, 2=numKey, 3=midClick, 4=drop, 5=drag, 6=doubleClick |
| clickedItem | ItemStack | Item in slot before the click |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Window ID | byte | 0=player inv |
| Slot | short | -999=outside window |
| Used Button | byte | 0=left, 1=right + shift |
| Action Number | short | Transaction counter |
| Mode | byte | 0=click, 1=shiftClick, 2=numKey, 3=midClick, 4=drop, 5/6=drag |
| Clicked Item | Slot | ItemStack before click |
MCP References
NetHandlerPlayServer.processClickWindow()Handler Interface
INetHandlerPlayServerNotes
implementation Implementation Cases
Usually NOT constructed directly — modules use mc.playerController.windowClick() which sends C0E internally. Disabler cancels C0E to prevent server from detecting fast inventory actions.
// Vanilla sends this through PlayerControllerMP:
this.connection.sendPacket(new C0EPacketClickWindow(windowId, slotId, mouseButton, mode, itemStack, actionNumber));
// Disabler — cancel
event.setCancelled(true);Usually NOT constructed directly — modules use mc.playerController.windowClick() which sends C0E internally. Disabler cancels C0E to prevent server from detecting fast inventory actions.
// Vanilla sends this through PlayerControllerMP:
this.connection.sendPacket(new C0EPacketClickWindow(windowId, slotId, mouseButton, mode, itemStack, actionNumber));
// Disabler — cancel
event.setCancelled(true);Usually NOT constructed directly — modules use mc.playerController.windowClick() which sends C0E internally. Disabler cancels C0E to prevent server from detecting fast inventory actions.
// Vanilla sends this through PlayerControllerMP:
this.connection.sendPacket(new C0EPacketClickWindow(windowId, slotId, mouseButton, mode, itemStack, actionNumber));
// Disabler — cancel
event.setCancelled(true);Usually NOT constructed directly — modules use mc.playerController.windowClick() which sends C0E internally. Disabler cancels C0E to prevent server from detecting fast inventory actions.
// Vanilla sends this through PlayerControllerMP:
this.connection.sendPacket(new C0EPacketClickWindow(windowId, slotId, mouseButton, mode, itemStack, actionNumber));
// Disabler — cancel
event.setCancelled(true);