Repository navigation
Conversation
Clients simulate piston moves themselves. The shape updates make note blocks recompute their instrument, so a note block used as a polymer block's client state changes and passes the change along its column. The server state is unchanged, so nothing corrected it until a relog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Froosty11
marked this pull request as draft
October 21, 2026 08:51
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.
Problem
Polymer blocks that use note block states on the client (
BlockModelType.FULL_BLOCKin polymer-blocks) turn into plain note blocks for vanilla clients when a piston pushes or pulls a block above or below them. The whole column changes, and only a relog fixes it.Clients simulate piston moves themselves (
PistonBaseBlock.moveBlocksruns on the client from the block event). The shape updates it sends makeNoteBlock.updateShaperecomputeinstrumentfrom the blocks above and below. The new state is no longer the one Polymer assigned, and the change updates the next note block down the column. On the server those blocks are unchanged, so no block update is ever sent.Fix
After a successful
moveBlockson the server, walk up and down from every moved position (and the piston arm) and mark each block that the client sees as a note block as changed. The chunk broadcast goes out after the block event packet, so the client gets the real states after it has simulated the move. The client already waits 5 ticks for the server's state when the move finishes, so the end of the move doesn't need the same handling.Testing
On
:polymer-blocks:runTestmodServerwithblocktest:block/chlorophyte_block, I added temporary logging and confirmed that pushing the top block off a column, and pushing a block onto a column, resend exactly the column below. I haven't checked it with a vanilla client yet.