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

Functions return the output of commands only if the command doesn't start with return run

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w41a
    • 23w31a
    • None
    • Community Consensus
    • Commands
    • Normal
    • Platform

      When runningĀ 

      execute store result <storage location> int 1 run function <function location>

      in a function the output will be stored for every command executed in the called function except for commands starting with "return run".

      With the attached datapack applied when running the bug:main function the output is stored for the first 2 "random roll 0..100000" commands even though those commands aren't prepended with "return run" and the output of the last "random roll 0..100000" command isn't stored even though it is prepended with "return run"

            boq [Mojang] Bartosz Bok
            coehlrich coehlrich
            Votes:
            9 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: