When using 'trigger' events in on_interact component, the 'condition' is not working correctly.
If you look at the example code, the condition always true. Even when the player is not holding a stick.
To make sure it wasn't the get_equiped_item_name query that was not working correclty I also tested following code, with same problems (block still gets
placed, even when condition is '0'):
[media]
Linked issues
is duplicated by 1
Attachments
Comments 19

Android 8.0.0
Can Confirm that the trigger response still ignores both "condition" and "conditions" in the latest beta however "condition" is working for on interact.
I have a demo behavior pack to Demonstrate it
steps to reproduce:
1). Load the attached addon
2). Use command "/give @s demo:demo_block"
3). Place the block
4). Tap the block
expected behavior: nothing happens as the chain of events is dependent on two conditions set to 0.
observed behavior: four blocks of bedrock are placed despite the 0 conditions.
Also I recommend adding the tags: block, event, and addon
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
Resolving temporarily as Awaiting Response. Does this issue occur in the latest version (1.21.0) if you put the condition inside the on_interact component using one of the queries below with the correct formatting?
query.get_equipped_item_name('main_hand') = 'item_name'
query.is_item_name_any('slot.weapon.mainhand', 0, 'namespace:item_name')
This ticket will reopen automatically when you reply.