Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Enchant Item

Play 0x11, client → server.

play · 0x11 · serverbound (client → server)

Clicks a button in a container that has buttons: enchanting table options (enchantment 0-2), lectern page controls, loom pattern, or stonecutter recipe. windowId identifies the open container. The server applies the button action and sends slot updates.

Sent by the client, read by the server. Listen for it with client.on("EnchantItem", (data) => …) on the receiving side.

Fields

Field Type Notes
windowId ContainerID
enchantment VarInt

Send it

await client.sendPacket("EnchantItem", {
  windowId: /* ContainerID */,
  enchantment: /* VarInt */,
});

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: src/Core/Versions/776/Packets/play/serverbound/EnchantItem.ts

Was this page helpful?