-
Bug
-
Resolution: Incomplete
-
None
-
1.16.10, 1.16.221 Hotfix
-
None
-
Unconfirmed
-
Multiple
THE BUG
When using the caret notation in functions (eg. execute @a ^ ^ ^), it is treated as tilde notation. The command "execute @p ^ ^ ^10 tp @e[type=cow] ~ ~ ~" should teleport all cows in front of the player. This command works correctly when using command blocks but when used in functions, it moves the cows to the south of the player instead. If the command "execute @a ^ ^ ^5 tp @e[type=cow] ~ ~ ~" is typed into a command block, all the cows will teleport 5 blocks in the direction the player is looking. This is the intended result.
A work around this would be this command: "execute @p ~ ~ ~ tp @e[type=cow] ^ ^ ^10". This works exactly as the command "execute @p ^ ^ ^10 tp @e[type=cow] ~ ~ ~". I briefly tested it and the work around is applicable to other commands other than spreadplayers. Kindly test this work around for further information. I have attached a behavior pack for further testing.
HOW TO REPRODUCE
The Bug
- In a .mcfunction file, type "execute @a ^ ^ ^5 tp @e[type=cow] ~ ~ ~". Then save the function as 'test'. The behavior pack for download contains the function too.
- . Make a behavior pack containing the function.
- Load in the behavior pack.
- Place a command block and input in the command 'function test'.
- Set the command block type to Repeat and redstone to Always Active.
- All cows will teleport 5 blocks south of the player instead of where to players is looking.
The Work around
- In a .mcfunction file, type "execute @a ~ ~ ~ tp @e[type=cow] ^ ^ ^5". Then save the function as 'test'. The behavior pack for download contains the function too.
- Follow the instructions 2-3 from above.
- Place a command block and input in the command 'function workaround'.
- Set the command block type to Repeat and redstone to Always Active.
- All cows will teleport 5 blocs in front of the player.
- is duplicated by
-
MCPE-128870 mcfunction command direction
- Resolved
-
MCPE-142783 Execute in function
- Resolved