Skip to content

pc: fix entity_teleport packet structure for 1.21.4-1.21.11 (velocity, f32 yaw/pitch, relative flags) - #1251

Open
AnonymoDGH wants to merge 1 commit into
PrismarineJS:masterfrom
AnonymoDGH:fix/mcd-520
Open

pc: fix entity_teleport packet structure for 1.21.4-1.21.11 (velocity, f32 yaw/pitch, relative flags)#1251
AnonymoDGH wants to merge 1 commit into
PrismarineJS:masterfrom
AnonymoDGH:fix/mcd-520

Conversation

@AnonymoDGH

Copy link
Copy Markdown
Contributor

Fixes partial packet errors for entity_teleport on versions 1.21.4 through 1.21.11 (reported in mineflayer#3759: "Chunk size is 67 but only 33 was read" on 1.21.8).

The packet structure changed in 1.21.2 (per minecraft.wiki Synchronize Vehicle Position and confirmed against the NeoForge 1.21.5 javadoc for ClientboundTeleportEntityPacket): yaw/pitch became f32 (previously i8), and three new velocityX/Y/Z doubles plus a relative flags bitfield were added before onGround.

Verification: the reporter's actual packet buffer (768080808004c0...) previously decoded with only 33 of 67 bytes read; with this fix it decodes the full vanilla structure (entityId, x/y/z, velocityX/Y/Z, yaw/pitch, flags, onGround) — the remaining 2 bytes are a non-standard server (Wolfx) extension.

Complements PR #1154 (which covers 1.21.3) by applying the same fix to all later versions: 1.21.4, 1.21.5, 1.21.6, 1.21.8, 1.21.9, 1.21.11.

Verified: all 6 versions regenerate cleanly (yaml/json in sync); protocolSync passes.

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