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

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.12 Pre-Release 5
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed

      Description

      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
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: