Suggestion: Revert the 1.10 /tp change and use a new syntax!
How has the teleport command changed?
So for those who don't know, in the recent 1.10 snapshots 16w20a and 16w21a and b changed something fundamental in the /tp command.
Here is how the command used to work:
- Say you have an armor stand named Bob, and you want to teleport Bob two blocks up.
- You would run /tp @e[type=ArmorStand,name=Bob] ~ ~2 ~ and then Bob moves two blocks up.
Here is how the command now works:
- Say you have an armor stand named Bob, and you want to teleport Bob two blocks up.
- If you run /tp @e[type=ArmorStand,name=Bob] ~ ~2 ~ Bob will teleport to you, and then two blocks up from your position, and this is not what was intended
- Instead, you have to execute at the entity to teleport itself up, so you would run /execute @e[type=ArmorStand,name=Bob] ~ ~ ~ /tp @e[type=ArmorStand,c=1] ~ ~2 ~
The way /tp now works is that it runs it as if executing from the entity that ran the command. That means that if you ran a command to teleport an entity up two blocks like the old way, it would teleport to you FIRST then teleport two blocks up. Basically the x y z argument in /tp gets the coordinates of the entity that ran the command and teleports the entity specified to that coordinate.
Why was this changed?
One reason it seems that this was changed is for 'consistency.' By this I mean it was changed so that it runs like other commands, where the coordinates are relative to the entity that ran them, like /execute or /summon.
Another reason may be that it allows for teleporting an entity relative to another entity's location, which is a neat feature that used to take two teleport commands to achieve.
Why is this not ideal and how can it be changed?
Most usage of the teleport command is to teleport an entity upwards, and not to teleport an entity to whatever ran the teleport command and THEN upwards. This means that the new usage makes teleporting an entity relative to another entity the prime usage, which means that the command favors a lesser used function. So this new command sacrifices usability for mainly consistency, which in my opinion doesn't justify it. It also breaks numerous past systems that rely on the old teleport function. Additionally, in order to get the old usage, two commands (/execute @e ~ ~ ~ /tp @e[c=1] ~ ~ ~) must be run instead of one (/tp @e ~ ~ ~). This makes commands unnecessarily longer and prone to more lag. Specifically, because it needs an additional /execute, there are two selectors being used, one to select in /execute and one to select in /tp. Selectors aren't very efficient as they will run through every entity no matter what selectors are used in order to find the set entity, and having two can potentially increase lag with many entities.
Instead I propose a new command syntax that will retain the original tp function while also adding this new relative teleport feature:
- /tp [target player] <destination player> <x> <y> <z> [<y-rot> <x-rot>]
The x, y, z, y-rot, z-rot are relative to the destination player if using ~. Teleporting with normal numbers would simply result in teleporting to the coordinate.
Ex:
- Teleport 5 above destination – /tp Bob Joe ~ ~3 ~
- Teleport to player but maintain a specified y coordinate of 90 – /tp Bob Joe ~ 90 ~
- Teleport Zombie to 4 blocks away from Villager called Bill facing upwards – /tp @e[type=Zombie] @e[type=Villager,name=Bill] ~4 ~ ~ 0 270
- Teleport to a player at a distance and always face them towards negative X – /tp Bob Joe ~-3 ~1 ~ 90 ~
This way, nothing using the old tp function will be broken, while also adding the new relative to entity coordinate teleport all in one single /tp command and not two like /execute @e ~ ~ ~ /tp @e ~ ~ ~.
Here is the original /r/minecraftsuggestions post I made 2 years ago that outlines my proposed tp command: http://ift.tt/1scWWD3
Another alternative is a suggestion by /u/GamerGuppy, in which there are different types of teleports but still in one /tp command, and he outlines his idea for the /tp command in this imgur post. (I need to find the link later, will update)
Submitted May 26, 2016 at 11:29AM by onnowhere
via reddit http://ift.tt/1qLWUkj