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
Open
pc: fix entity_teleport packet structure for 1.21.4-1.21.11 (velocity, f32 yaw/pitch, relative flags)#1251AnonymoDGH wants to merge 1 commit into
AnonymoDGH wants to merge 1 commit into
Conversation
…ity, f32 yaw/pitch, relative flags)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes partial packet errors for
entity_teleporton 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 newvelocityX/Y/Zdoubles plus a relative flags bitfield were added beforeonGround.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.