mojira.dev
MCPE-166090

triggerEvent doesn't work for items

If you try to trigger an item event using triggerEvent in gametest on an custom item with an item event, it won't trigger the item event and also wont give any error message, it only causes an single watchdog warning when you run it for the first time. (seen in the image) :

[Scripting][warning] 2201.517 ms script spike detected in behavior pack 'Star Wars Add-on Armory Supply Pack v.1.12 [BP]'

Steps to reproduce:

  1. Install the addon pack given in the attachment

  2. Create an new world with gametest settings on

  3. Search for the item named dc15s and click it (keep in mind that in this pack it will also shoot an bullet and open an form ui) 

  4. What should happen: the message test should appear

  5. What actually happens: nothing at all happens

Observed Results:
expected trigger does not run, only one error at the first time trigger attempted: [Scripting][warning] 2201.517 ms script spike detected in behavior pack 'Star Wars Add-on Armory Supply Pack v.1.12 [BP]'

Expected Results:
trigger is expected to run.

Attachments

Comments 8

Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response
To make your bug report as effective as possible, please try and include a video and the following steps to reproduce the problem:

Steps to Reproduce:
1.
2.
3.
Observed Results:
(Briefly describe what happens)
Expected Results:
(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
This ticket will automatically reopen when you reply.
Quick Links:

[media]

 Issue Guidelines – 

[media]

 Mojang Support – 

[media]

 Project Summary – 

[media]

 Suggestions – 

[media]

 Minecraft Wiki 

This needs to be resolved as it is important for addons.

Could you please specify which exact settings need to be turned on during world creation for the pack to function as described?

This ticket will automatically reopen when you reply.

Activate all experimental or just the gametest setting

Important to know is also, that the script to test the issue is not updated to the newest version and therefore only work in 1.19.51

If possible, could you please update the pack to the latest version?

This ticket will automatically reopen when you reply.

The issue still exists in the most recent stable version of Minecraft (1.20.51)
Here is a more detailed list of steps to reproduce and the expected vs actual results:

I have also added an example pack with just the bare essentials to demonstrate this issue (triggerEvent-demo_BP.mcpack)

Steps to reproduce:

1. Create an item with a custom event.

2. Write a script to trigger that item's event.

(^^ Both of these steps are done in the demo pack)

3. Create world with Holiday Creator Features and Beta API toggle

4. Interact click with the item (tt:rock_events)

5. Crouch and interact click with the item

(The example pack item triggers the event in JSON when the player is crouching)

 

Expected Behavior:

The event is triggered for both times, crouched and uncrouched

 

Actual Behavior:

The event is only triggered by the JSON method (when crouched)

Can confirm, affects 1.20.62

ID-Production

(Unassigned)

958456

Confirmed

Multiple

Android 11

Script-API

1.19.51, 1.20.62 Hotfix

Retrieved