0x2D S2DPacketOpenWindow
Opens an inventory GUI window (chest, crafting table, furnace, enchantment table, etc.) with window ID, type, title, and slot count.
Fields
| Field | Type | Description |
|---|---|---|
| windowId | unsigned byte | Server-assigned window ID |
| inventoryType | String | GUI type identifier (minecraft:chest, minecraft:crafting_table, etc.) |
| windowTitle | IChatComponent (JSON) | Window title displayed in GUI |
| slotCount | unsigned byte | Number of slots in the window |
| entityId | int | Entity ID for EntityHorse type (only present for horse GUIs) |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Window ID | Unsigned Byte | |
| Inventory Type | String | minecraft:chest, etc. |
| Window Title | Chat Component (JSON) | Displayed as window title |
| Slot Count | Unsigned Byte | |
| Entity ID (if horse) | int | Only for EntityHorse type |
MCP References
MCP
NetHandlerPlayClient.handleOpenWindow()Handler Interface
HND
INetHandlerPlayClientNotes
Inventory types: minecraft:chest, crafting_table, furnace, dispenser, enchanting_table, brewing_stand, villager, beacon, anvil, hopper, dropper, EntityHorse. RektSky B5 ChestStealer intercepts this packet for silent chest handling — it cancels the vanilla open, stores the window data, and manages the chest entirely via packet-level manipulation.
implementation Implementation Cases
ChestStealer
(Gugustus, Tenacity 6.0)
Detect window opening (chest, crafting table, etc.). ChestStealer triggers on GuiChest open.
if (event.getPacket() instanceof S2DPacketOpenWindow) {
S2DPacketOpenWindow s2d = (S2DPacketOpenWindow) event.getPacket();
if (s2d.getGuiId().equals("minecraft:chest")) chestStealer.enable();
}InvManager
(Gugustus, Tenacity 6.0)
Detect window opening (chest, crafting table, etc.). ChestStealer triggers on GuiChest open.
if (event.getPacket() instanceof S2DPacketOpenWindow) {
S2DPacketOpenWindow s2d = (S2DPacketOpenWindow) event.getPacket();
if (s2d.getGuiId().equals("minecraft:chest")) chestStealer.enable();
}AutoArmor
(Gugustus, Tenacity 6.0)
Detect window opening (chest, crafting table, etc.). ChestStealer triggers on GuiChest open.
if (event.getPacket() instanceof S2DPacketOpenWindow) {
S2DPacketOpenWindow s2d = (S2DPacketOpenWindow) event.getPacket();
if (s2d.getGuiId().equals("minecraft:chest")) chestStealer.enable();
}