mojira.dev
MC-102676

Teleporting an entity with relative position isn't working correctly.

Description: When you have a command block teleport an entity using relative position it will teleport the entity to the command block and not the correct relative position.

Reproduction steps.
1. Put the following commands into two command blocks that are 1 or 2 blocks apart.
summon MinecartRideable ~ ~1 ~ {CustomName:F1,NoGravity:1}
tp @e[name=F1] ~ ~2 ~

2. Summon the Minecart with the command block and make note of the location
3. Activate the command block to teleport the Minecart and make note of where it teleported to.
4. Keep activating the teleport command block to see if the position changes.

Expected results: The minecart should have teleported 2 blocks up from it's current position.

Actual Results: The minecart teleport to be above the second command block and would not teleport higher if you keep activating the teleport command block.

Linked issues

Attachments

Comments 3

Please do not mark unreleased versions as affected.
You don't have access to them yet.

sorry I just didn't see the option for the snapshot in the list.

Judging from the looks of this I think it's all in working order. The second command block that you said would tell the minecart to teleport itself upward 2 blocks has the coordinates (~, ~2, ~), which means the X stays the same and the Z stays the same. However, the ~2 means that the minecart is teleported two blocks above of the command block, not two blocks above itself.
So basically, the way you set up the command block is that the minecart teleports two blocks above the command block, not itself.

Zackery Anderson

(Unassigned)

Unconfirmed

command, command_block

Minecraft 16w21b

Retrieved