Skip to content

Fix packet_enchant_item enchantment field type for 1.21.11 - #1255

Open
reallyoldfogie wants to merge 1 commit into
PrismarineJS:masterfrom
reallyoldfogie:fix/enchant-item-1.21.11-button-id-type
Open

Fix packet_enchant_item enchantment field type for 1.21.11#1255
reallyoldfogie wants to merge 1 commit into
PrismarineJS:masterfrom
reallyoldfogie:fix/enchant-item-1.21.11-button-id-type

Conversation

@reallyoldfogie

Copy link
Copy Markdown
Contributor

The enchantment (button ID) field in packet_enchant_item was declared as i8 for 1.21.11 only, an isolated regression relative to every other version (1.21.1-1.21.9, and later 26.1), all of which declare it as varint.

Confirmed against 1.21.11's own decompiled source: net/minecraft/network/packet/c2s/play/ButtonClickC2SPacket.java encodes buttonId with PacketCodecs.VAR_INT, matching every other checked version. There was no real protocol change here.

The enchantment (button ID) field in packet_enchant_item was declared
as i8 for 1.21.11 only, an isolated regression relative to every
other version (1.21.1-1.21.9, and later 26.1), all of which declare
it as varint.

Confirmed against 1.21.11's own decompiled source:
net/minecraft/network/packet/c2s/play/ButtonClickC2SPacket.java
encodes buttonId with PacketCodecs.VAR_INT, matching every other
checked version. There was no real protocol change here.

Regenerated protocol.json via tools/js (npm run build) and verified
with npm run test (1849 passing, 1 pending, 0 failures).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant