Fix pc/26.1 client_command actionId: plain varint, not a mapper - #1284
Open
u9g wants to merge 1 commit into
Open
Fix pc/26.1 client_command actionId: plain varint, not a mapper#1284u9g wants to merge 1 commit into
u9g wants to merge 1 commit into
Conversation
The vanilla packet writes the Action enum ordinal (writeEnum) on 26.1 exactly as on 1.21.11, and pc/26.1 is the only protocol.json that declares the field as a mapper. The strict compiled mapper (node-protodef PrismarineJS#176) throws on the numeric id every client writes, so the auto-respawn after death errors the serializer stream and the server times the connection out.
Member
|
Seems like this should be other way around. Is it a fixed enum or variable field ? |
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.
packet_client_command.actionIdin pc/26.1 is avarint, as in every other pc protocol.json (1.9 through 1.21.11).Actionenum ordinal (writeEnum), so 0 = perform_respawn, 1 = request_stats, 2 = request_gamerule_values.actionId: 0serializes on 26.1; with the mapper it threwSizeOf error for undefined : 0 is not in the mappings value, the serializer stream errored and the server timed the connection out (disconnect.timeout).Verified against a local vanilla 26.1 server:
/killon a mineflayer bot now ends in a clean auto-respawn (health 20, alive, no serializer error). The protocol passesprotodef-validatorwith the repo's extra types.Sibling of #1278, which does the same for
use_entity.hand, the only other 26.1-only mapper in toServer.