1

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

1 emerald 6 replies 271 views | started 06/19/2017 4:36 pm by Hallowizer
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 avatar
Hallowizer
Level 7 : Apprentice Network
1

6 replies

1
08/07/2017 5:47 am
Level 9 Apprentice Miner
pyrotrooper14
avatar
"Hallowizer"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.


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 1 New Explorer
Tyde5969
avatar
try putting r=1 at the end
1
06/20/2017 6:37 pm
Level 7 Apprentice Network
Hallowizer
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 30 Artisan Engineer
Bertiecrafter
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 13 Journeyman Modder
Oran9eUtan
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 26 Expert Modder
WorldEditorRP
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

Search

Browse

Site

© planetminecraft.com

Welcome