When running a function that contains /say commands, the order of execution is incorrect - specifically, commands involving /say
To reproduce:
Start a new world, with a datapack that contains this function:
say a
tellraw @s "a"
say b
tellraw @s "b"
say c
tellraw @s "c"
Run this function, you will get these results:
a
b
c
Executed 6 command(s) from function 'foo:bar'
[Player] a
[Player] b
[Player] c
You would expect to get:
[Player] a
a
[Player] b
b
[Player] c
c
Executed 6 command(s) from function 'foo:bar'
Just for reference, an impractical workaround is to use
/reload
to block the server and force it to process the pending tasks.When you run the following function:
You will likely get the following output: