Prevent client-side noteblock stack flicker - #9
Open
pxlarified wants to merge 2 commits into
Open
Conversation
Keep vulnerable vertical custom noteblock breaks server-authoritative while preserving configured mining timing. Suppress client prediction with temporary client-only effects and restore the player's real effects after completion or abort. Add regression coverage for stacked FULL blocks and effect restoration.
Keep vanilla block breaking next to custom note blocks server-authoritative and replay the unchanged custom states after the target update. Track and acknowledge matching placement and break prediction sequences while preserving vanilla placement state and item consumption.
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
Prevents custom note-block models from briefly rendering as vanilla note blocks when a vertically adjacent block is broken or placed.
The change covers both affected paths:
FULLblock between other custom note blocks;Root cause
The authoritative server block states remain correct. The flash is produced by client-side block-state processing and packet timing:
harpresource-pack fallback instead of the custom model.A valid server update for a vanilla block can cause the same local neighbor recomputation even without a server-side note-block state change. Physics cancellation alone therefore cannot reliably solve the rendering problem.
Changes
Custom block breaking
FULLblock.BreakerSystem, including versions that normally use theBLOCK_BREAK_SPEEDattribute path.Adjacent vanilla block breaking
Player#breakBlockso vanilla drops, tool damage, block events, and protection listeners remain intact.Adjacent vanilla block placement
Packet handling
Folia and compatibility
Tests
NoteBlockClientPredictionTestcovers:Validation performed:
Both runs completed successfully, including compilation and tests for the Java 21 and Java 25 server modules.
Behavioral impact
Server-side custom note-block data and physics behavior are unchanged. The fix changes only how vulnerable client predictions are completed and when unchanged authoritative neighbor states are replayed. Unrelated vanilla blocks, isolated custom blocks, and custom blocks owned by other hardness mechanics keep their existing paths.