-
Bug
-
Resolution: Fixed
-
1.20.4 Release Candidate 1, 1.20.4
-
None
-
Community Consensus
-
Commands, Data Packs
-
Normal
-
Platform
The /return run when applied to a fork and a /function that doesn't return causes different behavior depending whether it is run in chat, inside of a function or using /debug function.
How to reproduce:
The attached data pack contains a function called bugtest:test with the following command:
execute as @e[tag=selected] run return run function bugtest:test2
The function bugtest:test2 is a small function that just contains the command "say Test" and doesn't return.
Now spawn multiple entities with the tag "selected", e.g. using the following command:
summon armor_stand ~ ~ ~ {Tags:["selected"]}
Then run the following commands:
- The command above directly in chat (the one with /return run)
- /function bugtest:test
- /debug function bugtest:test
Observed behavior:
1. and 3. The message "Test" appears for every entity spawned.
2. The message "Test" appears once and the function returns.
Expected behavior:
In all of the cases the message should only be shown once and return since /return run is supposed to always return.