mojira.dev
MCPE-151746

on_hit_block doesn't work in survival mode

In my addon, I created an item with component below:

"minecraft:weapon": {
    "on_hurt_entity": {
        "event": "dmg"
    },
    "on_hit_block": {
        "event": "block"
    }
}

When under creative mode and click left mouse button to hit and destroy a block, event "block" can be triggered. However, under survival mode, the same action will not trigger this event.


Tested in v1.18.12, the issue still exists.

Comments 2

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)?

This ticket will automatically reopen when you reply.

Quick Links:
πŸ““ Issue Guidelines – πŸ’¬ Mojang Support – πŸ“§ Suggestions – πŸ“– Minecraft Wiki

Cleaning up old tickets: This ticket has not been updated recently (~3 months+) so is being closed asΒ Cannot Reproduce.Β If you feel this is still a valid issue then please comment, or create a new ticket following the [Issue Guidelines|https://aka.ms/MCBugTrackerHelp].

Zijian Zhang

(Unassigned)

Unconfirmed

Windows

Windows 10

1.18.2 Hotfix, 1.18.12 Hotfix

Retrieved