Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-117722

Function if and unless always fail when executed in function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.12 Pre-Release 5
    • Confirmed

      The bug

      The /function command with if or unless always fails when it is executed in a function.

      How to reproduce

      1. Create a function custom:test
        function custom:test2 if @s
        
      2. Create a function custom:test2
        say test2
        
      3. Run the function custom:test
        /function custom:test
        

        → "test2" is not printed

      Note: As workaround you can use /execute

      execute @s ~ ~ ~ /function custom:test2 if @s
      

            Unassigned Unassigned
            SaltyBurrito824 Adam
            Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: