settings: send particleStatus to the server - #4045
Merged
Merged
Conversation
Member
|
CI fails |
u9g
force-pushed
the
fix/settings-particle-status
branch
from
September 4, 2026 12:15
8634a4b to
c657bf3
Compare
Test durations are too noisy for a hard gate: fishing and nether vary by 2-3x between identical runs, and master itself is failing the 1.5x check. Keep the comparison, but post the slower tests as a PR comment instead. Fork PRs run CI with a read-only token, so the matrix jobs upload the slower tests as an artifact and a workflow_run job posts (or updates) the comment. The PR number travels in the artifact because workflow_run.pull_requests is empty for forks. Mineflayer-Review-Complete: Done
bot.settings has defaulted particleStatus to 'all' since the field was added,
but the settings packet never included it, so on 1.21.3+ the mapper was
serialized from `undefined`. It only came out as 0 ("all") because the
compiled protodef mapper falls unmapped values through to the numeric type,
where NaN writes as 0; ProtoDef-io/node-protodef is making that a
serialization error, which would break every 1.21.3+ login. Send the field.
Mineflayer-Review-Complete: Done
u9g
force-pushed
the
fix/settings-particle-status
branch
from
September 4, 2026 12:29
c657bf3 to
6c45ee6
Compare
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.
bot.settings.particleStatushas defaulted to'all'since the field was added, but thesettingspacket mineflayer writes on login never included it. On 1.21.3+ (particleStatusis a mapper:all/decreased/minimal) the field was serialized fromundefined. It only came out as0=allbecause protodef's compiled mapper falls an unmapped value through to the numeric type, whereNaNwrites as0; the interpreted mapper throws on the same input.ProtoDef-io/node-protodef#176 makes the compiled mapper strict too (throw on a value not in the mappings), which turns this into a serialization error on every 1.21.3+ login. Send the field. The companion fix for node-minecraft-protocol's configuration-phase
settingsis PrismarineJS/node-minecraft-protocol#1519.No version gate needed: protodef containers only write the fields the version defines, so the extra property is ignored pre-1.21.3.
Tests: no test can fail without this change today — with the current protodef the bytes on the wire are identical (
undefined→0→all). Once protodef#176 lands, every existing 1.21.3+ external test exercises it (login would throw without it). Ran locally: internal suite (688 passing, all versions), externalchaton 1.8.8, 1.16.5 and 1.21.8, lint clean.