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

Return command can only return constants

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 23w17a
    • Unconfirmed
    • (Unassigned)

      Problem:

      Return command can only return predefined constants

      return 12 

      That means that you can not return result of other function (or just ony command)

      // do not work
      return function namespace:path/id
      return scoreboard players get Player board

      This feature will be very userful when creating datapacks.

       

      Possible solution:

      Allow return command to return result of any command. Like execute command handles and passes result of child command.

      // possible syntax variants
      return result function namespace:path/id
      return run scoreboard players get Player board

       

       

            Unassigned Unassigned
            _Socol_ Oleg Ivanov
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: