mojira.dev
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

Linked issues

Attachments

Comments 2

user-f2760

(Unassigned)

Confirmed

Platform

Low

Commands, Data Packs

1.20.4, 23w51b, 24w03a, 1.21.4

Retrieved