Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-162964

Game crashed when using new execute command test failed in script

XMLWordPrintable

    • Plausible
    • Multiple

      When using script to run new execute command and when itself condition is failed, game will be crashed

      Step to reproduce:

      1. Create an addon that contains feature for script working
      2. Paste below code to main.js
      3. Create world and turn on GameTest Framework, Upcoming Creator Features
      4. Broken one block with Bedrock on hand ( It's Working )
      5. Do same action with no item or other item in hand
      6. 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.

            Ducmkpro NguyenDuck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: