PaperMC / PaperMC/Paper

BlockBreakEvent missfires when player in adventure mode switches item in a last tick

Open
#14,042 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: needs triage version: 26.1.2
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

BlockBreakEvent should be cancelled if block wasn't actually broken.

Observed/Actual behavior

BlockBreakEvent fires when player in adventure mode switches item in a last tick while breaking a block,

https://github.com/user-attachments/assets/dd7e0bb2-4c37-4b77-b2eb-20a838959ff0

look in the chat

Steps/models to reproduce
  1. Set gamemode to Adventure
  2. /give @p minecraft:wooden_shovel[can_break={blocks:["minecraft:sand"]}] 1
  3. Start breaking a sand and press F on a last tick
Plugin and Datapack List

none

Paper version

This server is running Paper version 26.1.2-74-ver/26.1.2@e4e17fc (2026-07-06T16:51:09Z) (Implementing API version 26.1.2.build.74-stable)

Other

Any chance of backporting the fix to 1.21.11? 👉👈

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

No source file or test is identified in the report. First reproduce the Adventure-mode scenario with the listed command and item switch, then trace the block-breaking event path; done means the event is cancelled when the block is not actually broken and the reproduction no longer reports a fired event.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.