pc/26.1: use_entity.hand and client_command.actionId are varints, as on every other version - #1281
pc/26.1: use_entity.hand and client_command.actionId are varints, as on every other version#1281u9g wants to merge 2 commits into
Conversation
The mapper made 26.1 the only version where use_entity.hand takes a string. Clients that write `hand: 0` (the value every other version and every other hand field in 26.1 take) hit protodef's "0 is not in the mappings value" in sizeOf, which errors the serializer stream and drops the connection.
The packet is unchanged from 1.21.11 but 26.1 declares actionId as a mapper, so a client that writes `actionId: 0` to respawn hits protodef's "0 is not in the mappings value" and loses the connection.
|
Superseded: #1278 already makes Leaving the field evidence here since it was gathered on a live 26.1 server (JartexNetwork, 1.8 backend behind ViaVersion): with the mappers in place, |
Two serverbound fields are declared as
mapperon 26.1 and as plainvarinton every other version, including 1.21.11 immediately before it. Neither packet changed on the wire; only the JS value a client has to supply did.play.toServer.packet_use_entity.hand— the onlyhandfield in any version or direction that is not avarint.edit_book,arm_animation,block_place,use_itemandopen_bookare allvarinton 26.1 itself.play.toServer.packet_client_command.actionId—varinton 1.21.8, 1.21.9 and 1.21.11.A client that writes the numeric value — what every other version and every sibling field takes — hits
SizeOf error for undefined : 0 is not in the mappings valuein protodef, which errors the serializer stream and drops the connection. In mineflayer that is everybot.activateEntity(villager shops, NPCs, mounts) and everybot.respawn, so on 26.1 a bot loses its connection the first time it interacts with an entity or dies.Round trip after the change, through mineflayer's 26.1 serializer:
Verified against a live 26.1 server: before the change
bot.activateEntity(villager)threw inSerializer._transformand the socket closed; after it, the shop window opens.