Block#breakNaturally ignoring triggerEffects if incorrect tool is used
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
When a player breaks a block without the correct tool, it still plays the break particles and sound even if no item is dropped. Block#breakNaturally should do this if the triggerEffects parameter is true.
Observed/Actual behavior
There are no particles or sound when triggerEffects is true.
Steps/models to reproduce
Call Block#breakNaturally on a cobblestone block with triggerEffects set to false
Plugin and Datapack List
Plugins: packetevents, machinery (my own)
No custom datapacks.
Paper version
This server is running Paper version 1.21.6-33-main@aa6ee44 (2025-06-24T15:21:35Z) (Implementing API version 1.21.6-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.6-30-e454fef (MC: 1.21.6)
Other
One option to fix this is to just add a new method with another boolean parameter such as ignoreInvalidToolForEffects, or just edit the current behavior.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Block#breakNaturally implementation and any existing tests for invalid tools and triggerEffects. Reproduce the cobblestone case with an incorrect tool and triggerEffects enabled; done means particles and sound occur even when no item is dropped, without changing other behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100