I want to move all my villagers back to the middle of my town. I'm trying to work with the /tp command, but almost every time it says Entity not found.
/tp @e[type=minecraft:villager,dx=300,dy=300,dz=300] @p
/tp @e[type=minecraft:villager,distance=200] @p
The only time it worked was when I did this:
/tp @e[type=minecraft:sheep] @p
and it teleported like a hundred sheep into me.
Is there a reason the above ones wouldn't work?
1.14.4, using LAN mode with one other person
Best Answer
The first command doesn't always work because it's selecting a box that extends 300 blocks in the x, y, and z directions from your current location. If there's no villager in that box, they're not going to be teleported. You shouldn't be using the
dx
,dy
, anddz
selector arguments without thez
,y
, andz
selectors in most cases anyway. This kind of selection is best reserved for finding a target within a very specific box, which is probably not the case here.The second command doesn't work (except in very specific contrived circumstances) because you are trying to find a villager exactly 200 blocks away. For various reasons, this is basically impossible in normal gameplay. Fortunately it's relatively easy to fix this by searching for a villager less than or equal to 200 blocks away:
If you only want to teleport a single villager instead of multiple villagers, it's simple to impose that limit as well:
or to get a random villager: