mojira.dev
MCPE-103083

[Blocks] Trigger conditions not working.

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.

[media]

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

Attachments

Comments 19

[media][media][media][media][media]

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

Is this still an issue in the latest version? If so, can you add it to the affected versions?

Is this still an issue in the latest version? If so, can you add it to the affected versions?

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

9 more comments

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.

This bug is still valid as of version 1.21.0.

This bug is still valid as of version 1.21.0.

@unknown Have you tried putting the condition inside the on_interact component?

@unknown Have you tried putting the condition inside the on_interact component?

Stijn Defour

(Unassigned)

Community Consensus

Windows

1.16.100.60 Beta, 1.20.62 Hotfix, 1.20.71 Hotfix

Retrieved