I am building on a map for 1.16 and encountered a weird bug with the commend
"teleport [Name] ~ ~ ~ ~ ~" in a datapack... My goal was a screen animation for imersion
The whole line goes having multiple teleports where I change the X and Y rotation slightly to create a shaking screen that can be moved.
The whole File goes like this
File 1:
schedule function <File2> 4
execute as @a run teleport @s ~ ~ ~ ~1 ~3
This runs the next file
File 2:
schedule function <File3> 4
execute as @a run teleport @s ~ ~ ~ ~-2 ~-1
and so on
File 3:
schedule function <File4> 4
execute as @a run teleport @s ~ ~ ~ ~3 ~1
until it loops again unless a certain timer is reached... But... This warps you onto the worldspawnpoint for every function after the 1st, which is really annoying
Comments 2
Yes but no, you still [execute "as" @a] and have the coordinates of @unknown given for they are supposedly taken from the entity executing the command and not from the world spawn unless someone intentionally tempered with that... That means if your claims are true and thats correct it means the Worldspawn executes the function instead of the player only using the player as an entity cover which is a problem in itself and should be treated as a problem too imo since that dues to inefficient coding and minor issues in complex datapacks (Its not the first time I have to overspecify when using ~ ~ ~) So yea please at least try to change sth there so others dont get dumbfounded like I did
Not a bug. 'execute as @a run' does not run AT the @a-player. You should use 'execute as @a at @s run' to get this working correctly