1
Teleporting all mobs 1 block north
So im working on a minigame, and I need every zombie to be teleported one block up in the air
I used the command
/execute at @e[tag=Test] run tp @e[tag=Test] ~ ~1 ~
and gave the zombies i wanted teleported the test tag, when theres only one zombie, it works fine, but if theres more than one, instead of each of them being teleported 1 block in the air, they all teleport inside of eachother, I think whats happening is since its executing the zombies position and then teleporting them one block above that, its teleporting all the zombies in the same position.
it never did this in 1.12 before so I know theres a way you can fix this, does anyone know how?
I used the command
/execute at @e[tag=Test] run tp @e[tag=Test] ~ ~1 ~
and gave the zombies i wanted teleported the test tag, when theres only one zombie, it works fine, but if theres more than one, instead of each of them being teleported 1 block in the air, they all teleport inside of eachother, I think whats happening is since its executing the zombies position and then teleporting them one block above that, its teleporting all the zombies in the same position.
it never did this in 1.12 before so I know theres a way you can fix this, does anyone know how?
Create an account or sign in to comment.
3
2
~ ~1 ~ means you're going up, not North.
Therefore ~ ~ ~-1 goes north of the world's pov from the players position
- The x-axis indicates the player's distance east (positive) or west (negative) of the origin point—i.e., the longitude,
- The z-axis indicates the player's distance south (positive) or north (negative) of the origin point—i.e., the latitude,
Therefore ~ ~ ~-1 goes north of the world's pov from the players position
2
You're using the 1.13+ /execute. In 1.12, it's more or less like:
/execute @e[tag=Test] tp @s ~ ~1 ~
2
Almost but not quite. The actual full command would be /execute @e[tag=test] ~ ~ ~ tp @s ~ ~1 ~ or as the person above mentioned /execute @e[tag=test] ~ ~ ~ tp @s ~ ~ ~-1 to actually tp them north. The first set of coordinates is required for the execute command and you don't need to touch those, the second is for the tp so you can change those to any direction you want your tagged mobs to go.