mojira.dev
MC-262122

Return command can only return constants

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

 

 

Comments 1

Thank you for your report!
However, this issue is Invalid.

You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit Minecraft Suggestions on Reddit or visit the Feedback website.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Oleg Ivanov

(Unassigned)

Unconfirmed

(Unassigned)

command, datapack, return

23w17a

Retrieved