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

Feedback of a function with /return fail is identical to /return 0, despite behaving differently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.4, 23w51b, 24w03a
    • None
    • Confirmed
    • Commands, Data Packs
    • Low
    • Platform

      The bug

      When a function runs /return fail the feedback of the /function command is identical to the feedback of a function running /return 0.

      Steps to reproduce

      1. Create a function (called return:0) /return 0
      2. Create a function (called return:fail) return fail
      3. Turn command feedback on. /gamerule sendCommandFeedback true
      4. Run the first function via chat. /function return:0
        -> "Function return:0 returned 0"
      5. Run the second function via chat. /function return:fail
        -> "Function return:fail returned 0"

      Expected result

      "Function return:fail returned failure" or an alike message.
      Returning fail is different from returning 0 as returning 0 has a success of 1 and passes execute if function while fail has a success of 0 and fails execute if function

            Unassigned Unassigned
            jirauser71590 user-f2760 (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: