The bug
/teleport <targets> <destination>
should do the following:
Move each of
targets
to matchdestination
's coordinates.Send each of
targets
to the dimension in whichdestination
resides.
Here's what it actually does:
✔ Move each of
targets
to matchdestination
's coordinates.❌ Send each of
targets
to the dimension of the current command's context.
How to reproduce
Spawn a marker entity in the spawn chunks:
/summon armor_stand
Enter the nether
Run
/tp @s @e[type=armor_stand,limit=1]
→ ❌ You remain in the nether, but your coordinates change.Run
/execute in overworld run tp @s @e[type=armor_stand,limit=1]
→ ✔ You are transferred to the overworld and end up near the armor stand. The first command should have done this as well.
Dimension context should be overridden in this case, always using the dimension of the destination entity. For the /teleport
overload that uses coordinates, the dimension context should be used (this works now correctly).
Linked issues
is duplicated by 11
Comments 13
I had the same issue for snapshot 18w15a. This seems to be resolved in Minecraft 18w16a.
I would try again OP, and CreeperMagnet!
If that changes again, I'll update here.
Until this is fixed, you can use this as a simple workaround:
/execute at <entity> run tp <victim> ~ ~ ~
It isn't really teleporting between dimensions if you can't actually teleport between all of them. Perhaps it's just intended for teleporting to players, and not just any target entity, but that limits its use to multiplayer. Perhaps we'll see what the future holds for the new /chunk command, if it stays then there won't be an issue of unloaded entities anymore, and teleporting between dimensions will have a practical use outside of multiplayer. It just seems odd/wrong that they would intend to add the capability, but severely limit it like that, which is why I included the bit on the commands failing in some cases, but now with the /chunk command (if it survives) that part doesn't need to be addressed.
Ticket title covers the fix perfectly - just need to replace usage of the context world with the entity world when calling the teleport method.
Can confirm.