Skip to content

feat: Break particles#533

Merged
zardoy merged 5 commits intozardoy:renderer-removefrom
sandexzx:feat/break-particles
Apr 2, 2026
Merged

feat: Break particles#533
zardoy merged 5 commits intozardoy:renderer-removefrom
sandexzx:feat/break-particles

Conversation

@sandexzx
Copy link
Copy Markdown
Collaborator

@sandexzx sandexzx commented Apr 2, 2026

Description

Client-side event hooks for block break particles, crack particles, and biome tint data forwarding to the renderer. Integrates with the blockBreakParticles renderer module via backend methods.

Changes

  • Break Particles Hook: diggingCompleted event for local player, world_event effectId=2001 for multiplayer block breaks. Builds a 5×5 floor height map via buildFloorMap() for ground collision. Now forwards biomeName.
  • Crack Particles Hook: blockBreakProgressStage(block, stage) event fires per mining stage change (0–9). Reads block.face from prismarine-world raycast, builds floor map, calls spawnBlockCrackParticle(). Guards against stage === null (cancelled mining).
  • Biome Forwarding: all 3 event paths now extract and forward biomeName:
    • diggingCompleteddiggingBlock.biome?.name
    • world_event → fetches world block at position for biome data
    • blockBreakProgressStageblock.biome?.name
    • Fallback: 'plains' when biome data unavailable

Files Changed

File Lines Description
src/sounds/botSoundSystem.ts +16, -2 Added blockBreakProgressStage handler, added biomeName forwarding to all 3 particle spawn paths

Testing

  • Verified crack particles appear during mining on each stage change
  • Verified biome name is passed correctly (green particles for grass/leaves in plains biome)
  • TypeScript compiles cleanly (tsc --noEmit — 0 errors)

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: db7ee783-3cfb-4432-85e0-20736b947552

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sandexzx sandexzx force-pushed the feat/break-particles branch from 8bc290f to 371d6fb Compare April 2, 2026 13:14
@zardoy zardoy merged commit d905c30 into zardoy:renderer-remove Apr 2, 2026
3 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