mojira.dev
MC-123328

Entities will only use the last teleportation command if there are multiple in one tick

If you use a function to run two teleportation commands on an entity at once, the entity will only be moved by the final command. Without looking into the code, I'd warrant a guess that each teleportation command is overwritten by the next one (i.e. it applies the transformation to the entities coordinates at the beginning of the tick, not accounting for any previous teleportations), so only the last one actually updates the entities position.

I believe that while it is a separate issue from MC-122118, it is caused by the same underlying problem.

Steps to Recreate

1. Create a function that has 2 commands: "/tp @s ~ ~5 ~" and "/tp @s ~1 ~ ~"

2. Run that function from the chat

3. Notice how the player will only move to the side one block, but will not move up 5 blocks.

EDIT: After reading the resolution for MC-122726 I now believe that this is working as intended. Unfortunately, I cannot seem to delete this post... So, yeah.

Related issues

Comments

migrated

tp/teleport is relative to execution location, not entity; and function’s execution location is not at an entity (moving the entity does not move the execution location.

migrated

(Unassigned)

Unconfirmed

Minecraft 17w50a

Retrieved