mojira.dev
MC-104494

Relatively teleporting an entity resets its Motion

The bug

When teleporting an entity using the /tp or the /teleport command, its Motion is reset to Motion:[0.0d,0.0d,0.0d].

How to reproduce

  1. Place a repeating command block.

  2. Enter the command

    /execute as @e at @s run teleport @s ~ ~ ~

    and set it to always active.

  3. Summon any entity and notice it is not affected by gravity (or moving around).

What I expected to happen was

The entity should be unaffected by the command, because its motion should not be changed by the /teleport command, unless any coordinate is set to an absolute one,just like players.

What actually happened was

The entity stopped moving, because the teleportation resets its Motion.

Related issues

Attachments

Comments

migrated
[media][media][media][media]
user-f2760

Removed the conclusion as that is:

  1. a suggestion.

  2. not going to happen, 1.13 makes tp an allias of teleport.

onnowhere

Confirmed 1.15 pre-4. Mobs can still pathfind and walk and be pushed and knocked back while floating. Their pathfinding becomes erratic sometimes though. They just don't go up or down.

Tested with: /execute as @e[type=villager,distance=..13] at @s run tp @s ~ ~ ~

Avoma

Can confirm in 20w49a, with the command provided by Onnowhere.

user-f2760

Confirmed for 1.19, requesting
1. The commands in the description to be replaced with a simple

/execute as @e at @s run teleport @s ~ ~ ~

so you can check all mobs.
2. ownership, as this report is pretty neglected.

Brain81505

Can confirm in 1.21

AMGAMES04

Can confirim in 24w34a

TheMrZZ

user-f2760

(Unassigned)

Confirmed

Platform

Low

Commands

Minecraft 1.10.2, Minecraft 16w36a, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w01a, ..., 1.20.1, 1.20.2, 23w43a, 23w43b, 24w34a

Retrieved