Game crashed when using new execute command test failed in script
When using script to run new execute command and when itself condition is failed, game will be crashed
Step to reproduce:
- Create an addon that contains feature for script working
- Paste below code to main.js
- Create world and turn on GameTest Framework, Upcoming Creator Features
- Broken one block with Bedrock on hand ( It's Working )
- Do same action with no item or other item in hand
- Game Crashed
import { world } from 'mojang-minecraft'; world.events.blockBreak.subscribe(e => { let playerBroken = e.player; let blockDimension = e.dimension; let playerSelectedHotbarSlot = playerBroken.selectedSlot; try { blockDimension.runCommand( `execute positioned ~~~ run execute as ${playerBroken.name} if entity @s[hasitem={item=bedrock,location=slot.hotbar,slot=${playerSelectedHotbarSlot}}] run say passed` ); } catch { } });
Update test on Android:
Game not crash, world will closed and show a message
The server was shut down due to an unhandled scripting watchdog exception.