Repository navigation
Fix player input, items and chat on 1.21.8 - #270
Merged
Merged
Conversation
Paul1365972
force-pushed
the
fix/1.21.8-update
branch
from
November 18, 2026 09:31
5893e7f to
16a4036
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.
These are fixes for the 1.21.8 update. I compared the update with the vanilla 1.21.8 source and tested with a vanilla client. Four fixes are older than the update: the flying pose, the two chat colors and the emptied hand. They are in here because they sit in the same code, and the color ones disconnect players.
Changes:
fix(network): encode entity position sync in the 1.21.8 layout: The packet still had the 1.20.4 teleport layout. Previously a player moving more than 8 blocks at once disconnected everyone else in the plot.fix(network): read the on-ground bit from the movement flags: The flags byte was read as a bool, so a player touching a wall counted as not on the ground.fix(plot): read sneaking from player input and sprinting from the 1.21.8 action ids: Sneaking now comes from theplayer_inputpacket. Previously the server never saw it, and start sprinting was read as stop sneaking. Like in vanilla, sneaking only skips the clicked block while a hand holds an item.fix(plot): show the crouching pose only when not flying: Once sneaking is read, players flying with shift held would look crouched to others. The pose now follows vanilla, and a spectator counts as flying.fix(network): read creative slot item components with their length prefix: Previously opening the creative inventory with a filled/containeritem in it kicked the player. An item that holds items with components we can't read is now refused with a message. The removed components of nested items are read too.fix(text): reject non-ASCII digits in hex colors:#followed by a numeral such as²was sent as an invalid hex color, which disconnected everyone who received the message.fix(text): clear formatting on the reset code instead of sending it as a color:&rin chat was sent as the colorreset, which disconnected everyone who received the message.refactor(text): remove the link detection 1.21.8 clients ignore: Links in chat have not been clickable since the update, because the client ignores the old click event fields. This removes the detection and its regex instead of fixing it. A fix would have to validate every address, since the client disconnects on one it can't parse.fix(blocks): give the cauldron item for a water cauldron: Pick block on a water cauldron gave nothing.fix(plot): pick blocks into the hotbar like vanilla: Previously pick block overwrote the held item. Now it reuses a matching stack or takes a free hotbar slot, and other players see the picked item.fix(plot): pick a container with its contents when Ctrl is held: Ctrl+pick gave a container without its contents.fix(plot): show an emptied hand to the other players: Clearing or dropping the held item was not sent to others.fix(world): encode empty chunk sections without packed data: The empty chunks outside a plot sent 8 stray bytes of packed data for the blocks and for the biomes of each section.refactor(blocks): drop the 1.20.4 state ids from the replaceable block check: The id ranges were 1.20.4 values. No behaviour change, none of those blocks are implemented.