Mojira Archive
MC-267193

A function with /return fail run in chat doesn't indicate failure

If a function containing /return fail is run in chat, it returns a success of 1.

How to reproduce:

The attached data pack contains a function named bugtest:fail that runs /return fail.
Run the function with an "execute store result" and an "execute store success".

Observed behavior:

In chat, the message "Function bugtest:fail returned 0" appears and the result is 0 but the success 1.

Expected behavior:

A message "Function bugtest:fail failed" or similar should appear and result and success should both be 0 indicating failure.

Fixed

Rob23

2023-12-06, 04:15 PM

2024-02-09, 12:33 AM

2024-01-08, 10:32 AM

4

5

Community Consensus

Normal

Platform

Commands, Data Packs

1.20.3, 1.20.4

23w51a