1

Teleporting all mobs 1 block north

Swanlet's Avatar Swanlet7/18/19 5:16 pm
1 emeralds 162 3
7/19/2019 12:54 pm
CrazyCowMM's Avatar CrazyCowMM
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 Swanlet's Avatar
Swanlet
Level 38 : Artisan Miner
10

Create an account or sign in to comment.

3

2
07/19/2019 3:35 amhistory
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
~ ~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
2
07/18/2019 7:23 pm
Level 26 : Expert Ninja
AwesomeNinja886
AwesomeNinja886's Avatar
You're using the 1.13+ /execute. In 1.12, it's more or less like:

/execute @e[tag=Test] tp @s ~ ~1 ~
2
07/19/2019 11:36 am
Level 52 : Grandmaster Cowboy
CrazyCowMM
CrazyCowMM's Avatar
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

Website

© 2010 - 2024
www.planetminecraft.com

Welcome