If there's only one function in the tag:
If there's no /return command: The "/function #tag" is void, having no success value.
Otherwise: The success of "/function #tag" is whether the /return command in the function returns a failure or success.
If there're multiple functions in the tag:
If there's no /return command in any function: The "/function #tag" is void, having no success value.
Otherwise: The success of "/function #tag" is always true. ❌
How to reproduce:
Download and enable the attached data pack. In which, there're two functions and three tags. The two functions (a, b) are exactly the same, and both return a failure with a /return command. The three tags include function a, b, a&b, respectively.
Run /execute store success storage name path int 1 run function #a
Run /data get storage name path
✔ Found that it's 0. Because the /return returns a failure.
Run /execute store success storage name path int 1 run function #b
Run /data get storage name path
✔ Found that it's 0. Because the /return returns a failure.
Run /execute store success storage name path int 1 run function #anb
Run /data get storage name path
❌ Found that it's 1. Though both /return commands return a failure.
Expected behaviors:
Since both three commands above invoke a function tag, they should have consistent success value. Always true makes the success value (of tags that have more than one functions) useless.
Linked issues
Attachments
Comments 3
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Related to MC-267193, which was not fixed completely. Only the execution of one function is fixed. The execution of multiple functions in a tag is NOT fixed.