Mojira Archive
MC-267802

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

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

Unresolved

user-f2760

2024-01-08, 10:48 AM

2025-01-02, 12:10 PM

7

7

Confirmed

Low

Platform

Commands, Data Packs

1.20.4, 23w51b, 24w03a, 1.21.4

-