Skip to content

client: send particleStatus in the configuration-phase settings packet - #1519

Open
u9g wants to merge 1 commit into
masterfrom
fix/config-settings-particle-status
Open

client: send particleStatus in the configuration-phase settings packet#1519
u9g wants to merge 1 commit into
masterfrom
fix/config-settings-particle-status

Conversation

@u9g

@u9g u9g commented Sep 2, 2026

Copy link
Copy Markdown
Member

Since 1.21.3 Client Information (settings) carries particleStatus (all / decreased / minimal). The settings packet written on entering the configuration state (src/client/play.js) doesn't set it, so the mapper is serialized from undefined. It happens to go out as 0 = all today only because protodef's compiled mapper falls an unmapped value through to the numeric type, where NaN writes as 0 — the interpreted mapper throws on the same input.

ProtoDef-io/node-protodef is about to make the compiled mapper strict too (throw on a value not in the mappings, matching the interpreter), which turns this into a serialization error on every 1.21.3+ login. Send the field explicitly, default 'all', overridable via clientSettings.particleStatus like the other fields. Extra container fields are ignored on older versions, so this is safe pre-1.21.3.

Found while tracking down a Velocity "An internal error occurred in your connection" kick: a play-state packet written during a server transfer's configuration phase went out as a bare 0x00 byte for the same reason.

Since 1.21.3 Client Information carries a particle status (all / decreased /
minimal). The settings written on entering the configuration state left it
out, so the field was serialized from `undefined` — it only came out as 0
("all") because the compiled protodef mapper falls through unmapped values
to the numeric type, where NaN writes as 0. Send it explicitly, defaulting to
'all' and overridable through `clientSettings.particleStatus` like the other
fields.
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