mojira.dev
MCPE-240358

Cancelling playerBreakBlock on bed resets its color/state

Reproduction Steps

  1. Open a world with the following script enabled.

  2. Place a minecraft:white_bed in the world.

  3. Left-click the white bed to break it.

  4. Observe that the bed is not destroyed, but its color changes from white to red.
    Minimal Reproduction Script

    import { world } from "@minecraft/server";
    
    world.beforeEvents.playerBreakBlock.subscribe((event) => {
        event.cancel = true;
    });


Observed Results

  • The block break is cancelled: the bed remains in the world.

  • However, the bed's block state is reset: white_bed becomes red_bed.
    Expected Results

  • The block break should be cancelled.

  • The existing block state should be preserved exactly as it was before the interaction.

  • A white bed should remain a white bed.

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media]

I remember seeing a bug report that was like this, reporting that breaking a bed with many unobtainable items (nether portal as an item was used in the video) would convert the bed to red, although I don’t know the MCPE number.

killcerr

(Unassigned)

Unconfirmed

Windows

Windows 11 25H2

26.40.30 Preview, 26.32

Retrieved