Repository navigation
Conversation
26.3's ClientboundMoveEntityPacket (rel_entity_move / entity_move_look)
replaced the flat 3x-i16 delta with a packed `properties` varint (onGround
bit + stepCount) followed by either the old flat format (stepCount <= 0)
or `stepCount` chained {ticks, dX, dY, dZ} DeltaStep entries. The sub-count
depends on a value derived from properties at parse time (properties >>>
1), which plain protodef container/switch/countType can't express since
those only reference a sibling field's raw value, not a transform of it.
Adds a native `entityDelta` type (read/write/sizeOf, registered in both
the interpreted and compiled datatype tables, following the existing
UUID/restBuffer/entityMetadataLoop pattern) that reads/writes the whole
properties+delta combo and exposes a uniform
`{ onGround, steps: [{ dX, dY, dZ, ticks }] }` shape regardless of which
wire variant was used, so minecraft-data's schema and downstream consumers
(mineflayer) never have to branch on stepCount themselves. Verified with a
roundtrip unit test and against the manual byte layout from the original
crash report's dX:769/dY:-145 values.
Depends on the matching minecraft-data schema change
(DallasCarraher/minecraft-data, pc-26.3-support branch) that references
this type by name from packet_rel_entity_move / packet_entity_move_look.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
) * compression: enforce maximum uncompressed packet size The decompressor inflated packets with no bound on the output size, so a peer could send a small packet that expands to an unbounded synchronous allocation. Cap the inflate at the protocol maximum (2^23 bytes) via zlib's maxOutputLength and reject packets whose declared length already exceeds it. * compressionTest: add round trip test Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: extremeheat <extreme@protonmail.ch> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* checksum last seen messages in acknowledgement order Use the circular buffer's logical traversal for both acknowledgement bits and the checksum so wrapped chat histories stay synchronized with the server. * follow-up to PrismarineJS#1521 - added server test and fixed incorrect logic added a loopback integration test using node-minecraft-protocol's real server and client. It rotates the 20-message history, sends a standalone acknowledgement, verifies that a correctly checksummed/signed message is accepted, then changes only the next checksum and verifies that the server rejects it.
…marineJS#1529) 26.2 (protocol 776) added a mandatory sessionId: UUID field to packet_success. Since the server-side login flow built the packet without it, the compiled protodef writer threw "Write error for undefined : Cannot read properties of undefined (reading 'length')" as soon as a 26.2 client logged in against a server built on this library — every consumer that hosts its own server (flying-squid, mineflayer's test harness, etc.), not clients connecting to a real Mojang server (which always supplies it). Included unconditionally rather than gated behind a supportFeature check: protodef only reads the fields a version's schema defines, so this is inert on older versions' packet_success where the field doesn't exist. Found and fixed while getting PrismarineJS/minecraft-data#1298 (26.2 data) working end-to-end. Full suite: 6787 passing, 73 pending, 2 failing — both pre-existing and unrelated (a 1.16.5 server-download timeout, and a 26.1 packet-fuzzer gap for the ItemStackTemplate type that predates this change). Zero failures attributable to 26.2. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
26.1 introduced the ItemStackTemplate type (used by SlotComponent, Particle, SlotDisplay and advancements), and packetTest had no value for it, failing with 'No value for type ItemStackTemplate'. Claude-Session: https://claude.ai/code/session_01MY5J9XTnWK8ZsJTmxvi7vF Co-authored-by: Claude <noreply@anthropic.com>
…ket, anonymous position path switch)
- sample value for the entityDelta native type (one linear step, so it round-trips byte-exact)
- a void packet (26.3 punch) is sent as {} and arrives with no params; nothing to compare
- an anonymous switch that falls through to void adds no fields to its container
- sync_entity_position on 26.3+ gets a fixed linear PositionPath payload
- assertPacketsMatch takes the packet's own field list instead of the enclosing loop variable
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…he stacked fix branch The published protodef 1.19 passes the 26.3 packet round trips. The minecraft-data clone points at the branch with the 26.3 fixes until they land on pc_26_3. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Targets
pc26_3(the branch behind #1532), the same way #1550 finished 26.2.Changes
pc26_3(thesessionIdlogin success field from server: include sessionId in the login success packet for 26.2+ #1529, chat acknowledgement and compression fixes).entityDeltanative type for the 26.3 stepped entity-move encoding. Included because the packet tests below need it; if pc 26.3: add entityDelta type for the new stepped entity-move encoding #1538 merges first this PR rebases to a few lines.test/packetTest.js): a sample value forentityDelta, avoidpacket (26.3punch) is sent as{}and arrives with no params, an anonymous switch that falls through tovoidadds no fields, a fixed linearPositionPathpayload forsync_entity_position, andassertPacketsMatchtakes the packet's own field list instead of the enclosing loop variable (which hid a mismatch on packets that are a named type).No source changes beyond #1538 were needed: with the data fixes in PrismarineJS/minecraft-data#1345 the 26.3 encodings are all described in minecraft-data.
Testing
With minecraft-data from PrismarineJS/minecraft-data#1345 and the published protodef:
npm run mochaTest -- -g 26.3vagainst a vanilla 26.3 server: 260 passing, 2 pending, 1 failing. The failure ispings the server(ECONNRESET), the Windows-only one 26.2: merge master and drop the protodef debug overrides #1550 saw on 26.1 too.test/packetTest.js: 26.3v 233 passing; 26.1v 229, 1.21.11v 224, 1.20.4v 202 (unchanged).standardclean.🤖 Generated with Claude Code