Skip to content

fix: honor clicked blocks for debug stick interactions - #102

Merged
TWME-TW merged 1 commit into
TWME-TW:mainfrom
twme-ai:fix/candle-lit-interaction
Aug 19, 2026
Merged

fix: honor clicked blocks for debug stick interactions#102
TWME-TW merged 1 commit into
TWME-TW:mainfrom
twme-ai:fix/candle-lit-interaction

Conversation

@twme-ai

@twme-ai twme-ai commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Root cause

PlayerInteractEvent already identifies the exact clicked block, including its cursor hit position. Classic and Copy mode discarded that block and performed a second eye raycast with getTargetBlockExact(5). For short collision shapes such as candles, the second raycast could resolve the full block behind the candle. Sneaking changes the eye origin enough to hide the bug in some positions.

Fix

  • carry the event's clicked block through Classic and Copy left/right-click handling
  • fall back to an eye raycast only for air-click events
  • consume the off-hand follow-up after a handled Debug Stick click so vanilla empty-hand candle interaction cannot undo the change
  • remove the obsolete candle limitation from the README
  • add an in-game candle regression that verifies both sneaking and non-sneaking interaction, including an off-hand follow-up packet

Verification

  • mvn -B clean package (11 tests passed)
  • Paper 1.19.4 E2E on Java 17
  • Paper 1.20.6 E2E
  • Paper 1.21.1 E2E
  • Spigot 1.19.4 E2E on Java 17
  • Folia 1.20.6 E2E
  • existing locale, Freeze targeting, VirtualEntities removal, and barrier restoration assertions continue to pass
  • Node syntax, Markdown lint, and git diff --check

@TWME-TW
TWME-TW merged commit 4e6c905 into TWME-TW:main Aug 19, 2026
8 checks passed
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.

2 participants