mojira.dev
MCPE-186944

playerBreakBlock Event Cancels Chest Renaming

When using the playerBreakBlock event in Minecraft Bedrock's GameTest framework, cancelling the event (event.cancel = true) on a renamed chest causes the chest's custom name to reset, effectively erasing the custom name after the event is canceled.

  • Rename a chest using an anvil.

  • Implement a GameTest script that listens for the playerBreakBlock event on the chest.

  • In the event handler, use event.cancel = true to prevent the chest from breaking.

  • Attempt to break the renamed chest in-game.

  • Check the chest's name after the event is canceled.

Comments 1

For the ease of reproducing the bug, please attach the full behavior pack/script you're using.

David

(Unassigned)

Unconfirmed

Windows

Windows 11

1.21.30

Retrieved