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

/function only returns a "success" score if /return is run

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 23w41a, 23w42a, 23w44a
    • None
    • Plausible
    • Commands

      The bug

      As of 23w41a, the command

      /execute store success ... run function <FUNCTION NAME>

      doesn't store anything if the function doesn't run the /return command.

      This is intended when storing the result, but probably not when storing the success. Prior to 23w41a, the success was stored as 1 if the function was run, and 0 if the function couldn't be found.

      How to reproduce

      1. Create any function that does not contain the /return command
      2. Create an objective displayed in the sidebar:
        /scoreboard objectives add test dummy
        /scoreboard objectives setdisplay sidebar test
      3. Run the function, storing the success in the scoreboard objective:
        /execute store success score test test run function <FUNCTION NAME>

        Nothing appears in the sidebar

            Unassigned Unassigned
            Darth Cobby [Mod] j_p_smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: