PaperMC / PaperMC/Paper

Block#breakNaturally ignoring triggerEffects if incorrect tool is used

Open
#12,731 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: needs triage version: 1.21.6
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.