mojira.dev
MCPE-188501

Trigger onUseOn and Item Tags conflict

I noticed that the onUseOn trigger (class ItemComponentUseOnEvent) conflicts with tags representing «minecraft:is_axe{}», «minecraft:is_hoe{}» and «minecraft:is_shovel{}».

If a Custom Item contains, for example, the «minecraft:is_axe»{} tag, then the onUseOn event will be ignored when interacting with some blocks.

Steps to Reproduce:

1. Create any Custom Item with tag «minecraft:is_axe{
2. Add any Custom Component with trigger onUseOn (class ItemComponentUseOnEvent) or initialize an world event (world.afterEvents.itemUseOn)
3. Add «world.sendMessage('Hello, World!')»

Observed Results:

The game ignores the event when trying to interact with logs and stems using Custom Item with tag «minecraft:is_axe{}».

Expected Results:

We can see World Message «Hello, World!»

Custom Component Trigger example:

[media]

Tag «minecraft:is_axe» from custom_item.json:

[media]

Linked issues

Attachments

Comments 2

Thank you for your report!
We're tracking this issue in MCPE-183957, so this ticket is being resolved and linked as a duplicate.

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

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

GrostLight

(Unassigned)

Unconfirmed

Multiple

1.21.44 Hotfix

Retrieved