mojira.dev
MCPE-45662

Scripting event "minecraft:player_destroyed_block" does not fire in creative mode

The "minecraft:player_destroyed_block" fires only whenever a player breaks a block in survival mode. This should also fire when a player breaks a block in creative mode.

What was expected to happen:
The event should have fired normally even if the player who destroyed the block was in creative mode

What happens:
The event doesn't get fired for players breaking blocks in creative mode

Steps to Reproduce:

1. Get the behavior pack attached or use the following script:

const system = server.registerSystem(0, 0);

system.initialize = function() {
    system.listenForEvent("minecraft:player_destroyed_block", (eventData) => breakBlock(eventData))
}

function breakBlock(eventData) {
    let chatEventData = system.createEventData("minecraft:display_chat_event");
    chatEventData.data.message = "Player destroyed block!";
    system.broadcastEvent("minecraft:display_chat_event", chatEventData)
}

2. Enter a world with the aforementioned script (don't forget to enable Experimental Gameplay!)
3. Break a block in survival and later in creative
4. A chat message will get sent if we are in survival mode. This is however not the case if we are in creative mode.

Linked issues

Attachments

Comments 1

Thank you for your report!
We're actually already tracking this issue at MCPE-55948, so I resolved and linked this ticket as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

Wither

(Unassigned)

Unconfirmed

Windows

Windows 10

scripting-api

1.13.3, 1.13.1, 1.13.0.6 Beta, 1.13.0.5 Beta, 1.12.0.3 Beta, ..., 1.13.0.4 Beta, 1.13.0.2 Beta, 1.12.0, 1.14.1.2 Beta, 1.14.0

Retrieved