-
Notifications
You must be signed in to change notification settings - Fork 102
Fix player_info and sound packets for minecraft-data protocol changes #691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot sounds good, but please also check the mineflayer diff for reference, it implements much of the same changes we need here: https://patch-diff.githubusercontent.com/raw/PrismarineJS/mineflayer/pull/3689.diff |
Co-authored-by: extremeheat <13713600+extremeheat@users.noreply.github.com>
I've reviewed the mineflayer diff and implemented the same changes needed in flying-squid. The key fixes include: player_info packets: Changed UUID → uuid field names, added support for bitfield action format, and re-enabled player_info for 1.19+ versions. Sound packets: Updated to use new Holder structure (sound.soundId vs direct soundId, sound.data.soundName vs soundEvent.resource). The 1.21.3 test now passes successfully, confirming the protocol fixes are working. Commit b8d73e6 addresses the protocol schema changes. |
Co-authored-by: extremeheat <13713600+extremeheat@users.noreply.github.com>
| action: 2, | ||
| data: serv.players.map(otherPlayer => ({ | ||
| UUID: otherPlayer.uuid, | ||
| ping: otherPlayer._client.latency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This previous branch should've been removed
This PR addresses breaking changes in the minecraft-data protocol schema that affect multiple packet types across all supported versions.
Issue Analysis
The protocol schema changes in minecraft-data introduced several breaking changes:
UUIDtouuidand introduced bitfield action format for 1.19.3+ versionsChanges Made
player_info packets (login.js):
UUID→uuid(lowercase) for consistency with minecraft-data schema{ add_player: true, update_game_mode: true })"add_player","update_game_mode")"update_game_mode"vs"update_gamemode")Sound packets (sound.js):
{ soundId: <number> }format for registry references{ data: { soundName: <string> } }format for sound eventsnamed_sound_effectpacket for versions before 1.19.3Testing Results
The fixes have been verified across multiple Minecraft versions:
Impact
This fix restores compatibility across all supported versions (1.8.8 through 1.21.4) by implementing the proper packet structures based on the mineflayer reference implementation (PrismarineJS/mineflayer#3689).
Addressing #690.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.