Skip to content

Fix checksum error boundary in 1.21.9 and 1.21.11.#1187

Closed
TAOtxi wants to merge 3 commits into
PrismarineJS:masterfrom
TAOtxi:master
Closed

Fix checksum error boundary in 1.21.9 and 1.21.11.#1187
TAOtxi wants to merge 3 commits into
PrismarineJS:masterfrom
TAOtxi:master

Conversation

@TAOtxi
Copy link
Copy Markdown

@TAOtxi TAOtxi commented May 13, 2026

@extremeheat
Copy link
Copy Markdown
Member

Why is the checksum an i8 and not u8? That almost certainly seems wrong

Come to think of it PrismarineJS/node-minecraft-protocol#1442 doesn't seem to make sense either. Is there some inconsistency?

@TAOtxi
Copy link
Copy Markdown
Author

TAOtxi commented May 13, 2026

@extremeheat wiki mentioned checksum is sign byte.

@extremeheat
Copy link
Copy Markdown
Member

Java doesn't have unsigned types. This is not relevant to a checksum which are almost always treated as unsigned. It doesn't make sense to have a signed checksum

@extremeheat
Copy link
Copy Markdown
Member

A 32 bit checksum will use all 32 bits, there is no "sign bit" left over

@extremeheat
Copy link
Copy Markdown
Member

extremeheat commented May 13, 2026

Looks like the root issue is that there are different checksum fields with a mismatch of i8/u8... this should be fixed and nmp PR can be reverted

@TAOtxi
Copy link
Copy Markdown
Author

TAOtxi commented May 13, 2026

But https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.21.8/protocol.json#L9045 is also i8, and this commit fix the issue I mentioned.😐

@extremeheat
Copy link
Copy Markdown
Member

extremeheat commented May 13, 2026

Yes, it's incorrectly i8 in some places and u8 in others. Being fixed in #1188 and PrismarineJS/node-minecraft-protocol#1489

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.

Error boundary for checksum in 1.21.11

2 participants