1

[SOLVED]Why do entity selectors with coordinates never work?

Hallowizer's Avatar Hallowizer6/19/17 4:36 pm
1 emeralds 1.9k 6
8/7/2017 5:47 am
PyroCreative's Avatar PyroCreative
Hi! I think the title explains it, coordinate selectors never work. For example:

/tp @a[x=0,y=0,z=0] ~ ~1 ~


inside of a repeat-always-on command block will keep teleporting me above the command block, even if I never stood at 0,0,0 in the first place. And I see other examples of this working fine, by other people.

Is this because mojang decided to be stupid and use the windows encoding instead of UTF-8? This probably isn't the case because other selectors like tags and scoreboard objectives still work.
Posted by Hallowizer's Avatar
Hallowizer
Level 26 : Expert Network
7

Create an account or sign in to comment.

6

1
08/07/2017 5:47 am
Level 34 : Artisan Nerd
PyroCreative
PyroCreative's Avatar
HallowizerHi! I think the title explains it, coordinate selectors never work. For example:

/tp @a[x=0,y=0,z=0] ~ ~1 ~


inside of a repeat-always-on command block will keep teleporting me above the command block, even if I never stood at 0,0,0 in the first place. And I see other examples of this working fine, by other people.

Is this because mojang decided to be stupid and use the windows encoding instead of UTF-8? This probably isn't the case because other selectors like tags and scoreboard objectives still work.


Why are u putting an xyz format?
NO NON NNOONONONONONNOO
U are doing it wrong.

To target an entity, u have to do either :-
@p @a or @e or even @r

example if u want to teleport a zombie.
/tp @e[type=zombie] ~ ~ ~1

or if you want it to execute continuous teleportation

/execute @e[name="Zombie"] ~ ~ ~ /tp @e[name="Zombie"] ~ ~ ~1


Simple as a piece of cake. U were complicating this.
1
08/07/2017 1:39 am
Level 18 : Journeyman Explorer
Tyde5969
Tyde5969's Avatar
try putting r=1 at the end
1
06/20/2017 6:37 pm
Level 26 : Expert Network
Hallowizer
Hallowizer's Avatar
Thanks, it worked! (if you are reading this thread because you need help, this thread was created at version 1.12)
1
06/19/2017 4:58 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
You got two things wrong

the xyz arguments define the coords of execution (not the filtered location), add dx=#,dy=#,dz=# OR r=# to define a cube or sphere where the player has to be in.
So for everyone EXACTLY in the coords 1 5 8: /tp @a[x=1,y=5,z=8,dx=0,dy=0,dz=0] ~ ~1 ~

Secondly, the tp command teleports whatever entity relative to the entities position.
So if you would do: /tp @e ~ ~1 ~, it will tp anything 1 block upwards in the same position.

There are two ways to fix this:
/tp (...) 0 1 0
- You use stationary coords to teleport whatever to 0 1 0

Or
/teleport (...) ~ ~1 ~
- The teleport command teleports whatever entity relative to the command executor's position, which in this case is the block above the command block.

Good luck!
1
08/02/2017 6:50 am
Level 50 : Grandmaster Modder
Oran9eUtan
Oran9eUtan's Avatar
Thats technicaly not the way xyz works. The Argument xyz selects Enties based on their distance from that position. If you specify no distance (Radius, or as you said, Volume) all entities will get selected. If you specify a Volume dx,dy,dz or a radius r it only selects Entities in a radius/volumen from that position.

Edit: Sry, read your reply again, it seems you said just that *facepalm*
1
06/19/2017 4:56 pm
Level 47 : Master Modder
WorldEditorRP
WorldEditorRP's Avatar
Try this


~ ~ ~ - x y z

Armor stand tp @e[type=ArmorStand,r=1] ~ ~ ~
Zombie - tp @e[type=Zombie,r=1] ~ ~ ~
Player - tp @a -1983 35 2890
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome