Mojira Archive
MCPE-156634

GameTest Framework - mojang-minecraft - Multiple event calls on single use

Summary:
When subscribing to world events in GameTest Framework -> mojang-minecraft, such as:
world.events.itemUseOn
The event fires several times whenever the thing in question happens.

Steps to Reproduce:
1. Create a simple js script (the example I used is screenshotted below) that subscribes to the "itemUseOn" world event.
2. Load into any world seed.
3. Connect the Visual Studio Code debugger.
4. Put a breakpoint inside of the subscribed event handle.
5. In the game, right-click on any block to cause the event to fire.
6. Go back to VS Code and observe that the breakpoint has been hit.

Observed Results:

When F5 is pressed, the breakpoint is hit again immediately (from my testing, up to as many as 11 times).

Expected Results:

When F5 is pressed, the breakpoint should not be hit again until you have right-clicked again in the game.

Screenshots/Videos:


Notes:
This issue was seen on every event subscription I attempted (Item events, Block events,  & Entity events).

Works As Intended

BedrockChallenges

2022-06-05, 01:37 AM

2022-08-15, 05:42 PM

2022-08-15, 12:18 PM

1

1

Unconfirmed

Framework, GameTest

1.18.31 - 1.19.201.18.31, 1.19.0, 1.19.2 Hotfix, 1.19.10, 1.19.11 Hotfix, 1.19.20

-