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

"if block" and "unless block" don't work properly when using /execute in mcfunction files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.19.81 Hotfix
    • None
    • Plausible
    • Windows

      Hi Mojang

      I'm making an addon and I would like to run a command when the player walks on certain blocks. I'm using the /execute command with the new syntax, but it seems that "if" and "unless" don't work as intended : when using "if/unless block" the command will either ignore it and always run or stop working even when the conditions are matched.

      It works fine with "if score" though, and i don't understand why.

      My addon min engine is above 1.19.50 so the new syntax is the one to use.

      I ran some tests you can find below :

      1- The command should run when I'm standing in water but doesn't

      2- The command should run only if i'm standig in an air block, but still works when I'm in a block of stone

       

      I tried these commands directly in the game an they worked so i guess it's not the syntax...

       

      I hope you will be able to help me soon, thanks !

            JeanHubertGazon Jean Hubert Gazon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: