fix FakeBlockHelper chunk packet byte buffer misalignment#2834
Open
BehrRiley wants to merge 2 commits into
Open
fix FakeBlockHelper chunk packet byte buffer misalignment#2834BehrRiley wants to merge 2 commits into
FakeBlockHelper chunk packet byte buffer misalignment#2834BehrRiley wants to merge 2 commits into
Conversation
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.
Summary
this pull request fixes a critical network protocol error and client crash introduced in the
26.2update when utilizing fake blocks.Problem
the experimental Vulkan rendering changes in
26.2changed the internal byte serialization layout of chunk section data inside the packet namedClientboundLevelChunkWithLightPacket, reference: Java Edition 26.2 Release Notes. there's a newreadShort()missing fromfluidCountcurrently in the secondshortfield they added to chunks. thev26_2FakeBlockHelperwas reading the buffer using the old layout, thePalettedContainerdecoding derailed, then caused the index offset jump messing up the packet buffer; this just kicks players, or crashes the client if you do it right.Testing
used various examples, such as:
showfake stone <player.cursor_on>showfake grass <player.location.add[0,1,0]> duration:1sshowfake lava <player.location> players:<server.online_players>A working build of my latest successful build which has no errors can be found permanently at https://files.behr.dev/file-share/denizen-1.26.2-fix.jar or built with this branch.