Skip to content

Resend note block columns after pistons move blocks - #290

Closed
Froosty11 wants to merge 1 commit into
Patbox:dev/26.3from
Froosty11:fix/piston-note-block-columns
Closed

Froosty11 wants to merge 1 commit into
Patbox:dev/26.3from
Froosty11:fix/piston-note-block-columns

Conversation

@Froosty11

@Froosty11 Froosty11 commented Oct 21, 2026 •

Copy link
Copy Markdown

Problem

Polymer blocks that use note block states on the client (BlockModelType.FULL_BLOCK in 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.moveBlocks runs on the client from the block event). The shape updates it sends make NoteBlock.updateShape recompute instrument from 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 moveBlocks on 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:runTestmodServer with blocktest: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.

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
Froosty11 marked this pull request as draft October 21, 2026 08:51
@Froosty11 Froosty11 closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant