Pin the minecraft-data tarball that carries the 26.1 enum fix - #15
Closed
u9g wants to merge 1 commit into
Closed
Conversation
26.1 declared use_entity.hand and client_command.actionId as string mappers, so mineflayer's numeric writes threw in the serializer and closed the socket: bot.activateEntity and bot.respawn both ended the connection with no kicked event, leaving a bot that looks frozen.
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.
On 26.1
data/pc/26.1/protocol.jsondeclared two serverbound fields as stringmappers that are plainvarints on every other version:packet_use_entity.handpacket_client_command.actionIdmineflayer writes the numeric id for both, so protodef threw
SizeOf error for undefined : 0 is not in the mappings valueinsideSerializer._transform. That errors the write stream and closes the socket without akickedorerrorevent:bot.entitystill reads,physicsEnabledis still true, and a control loop keeps driving a bot that has sent nothing for minutes. In practicebot.activateEntity(every villager shop and NPC) andbot.respawneach ended the session on the first use.v3.116.0-allprs.3is byte-for-byteallprs.2apart from those two field types, so nothing else in the pinned stack moves. Upstream: PrismarineJS/minecraft-data#1278 foruse_entity.hand;client_command.actionIdis also handled from the code side by PrismarineJS/mineflayer#4076, which reads whichever form the loaded schema declares, so a later stack rebuild that picks up #4076 stays correct either way.Verified on JartexNetwork BedWars (26.1 over a 1.8 backend): with the old pin, right-clicking the shop villager dropped the connection; with this one the shop window opens, purchases go through, and the bot respawns after dying and keeps playing a full game.