Skip to content

Add continuous brushing for placed suspicious blocks#494

Merged
tastybento merged 1 commit intodevelopfrom
fix/continuous-suspicious-block-brushing
Apr 9, 2026
Merged

Add continuous brushing for placed suspicious blocks#494
tastybento merged 1 commit intodevelopfrom
fix/continuous-suspicious-block-brushing

Conversation

@tastybento
Copy link
Copy Markdown
Member

@tastybento tastybento commented Apr 9, 2026

Summary

  • Suspicious gravel/sand are placed programmatically by the magic-block handler, so vanilla brush mechanics never run on them. Previously each right-click advanced one dust stage with no animation, forcing players to spam-click with no visual progress.
  • Each click now also plays dust particles + brushing sound, and starts a 10-tick repeating session that keeps dusting while the player holds right-click (detected via Paper's Player#isHandRaised()). The session cancels when the player releases, looks away, swaps items, disconnects, or the block disappears — matching vanilla feel (~5s for a full brush).
  • completeBrush was refactored from (PlayerInteractEvent, Block) to (Player, Block) so the timer task can call it directly.

Closes #490

Test plan

  • mvn test -Dtest=BlockListenerTest2 — 39/39 pass
  • In-game: reach a phase that yields a suspicious block, hold right-click with a brush — verify smooth dust progression with particles + sound, loot drops on completion, brush takes durability
  • In-game: release mid-brush — verify dusting pauses; re-press to resume
  • In-game: look away mid-brush — verify the session cancels

🤖 Generated with Claude Code

Suspicious gravel/sand are placed programmatically by the magic-block
handler, so the vanilla brush animation never runs on them. The previous
right-click handler advanced one dust stage per click with no visual
progress feedback.

Now each click also plays dust particles and the brushing sound, and
kicks off a 10-tick repeating session that advances dusting while the
player keeps holding right-click (detected via Player#isHandRaised).
The session cancels when the player releases, looks away, swaps items,
disconnects, or the block disappears, matching vanilla feel.

Closes #490

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

@tastybento tastybento merged commit 1261851 into develop Apr 9, 2026
3 checks passed
@tastybento tastybento deleted the fix/continuous-suspicious-block-brushing branch April 9, 2026 02:20
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.

A suspicious bug

1 participant