Forumskeyboard_arrow_right Communities keyboard_arrow_right Redstone

Create Forum Thread

Teleporting all mobs 1 block north

1 emeralds3 replies77 views
created 07/18/2019 5:16 pm by Swanlet
last reply 07/19/2019 12:54 pm
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?
Posted by avatar
Level 3 : Apprentice Miner

comment Login or register to post a reply.

3 replies

07/19/2019 3:35 amhistory
Level 8 : Apprentice Modder
~ ~1 ~ means you're going up, not North.
  • 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
07/18/2019 7:23 pm
Level 19 : Journeyman Ninja
You're using the 1.13+ /execute. In 1.12, it's more or less like:

/execute @e[tag=Test] tp @s ~ ~1 ~
07/19/2019 11:36 am
Level 42 : Master Cowboy
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.

Planet Minecraft



© 2010 - 2019