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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w51a
    • 1.20.3, 1.20.4
    • None
    • Community Consensus
    • Commands, Data Packs
    • Normal
    • Platform

      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.

            Unassigned Unassigned
            Rob23 Rob23
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: