[MC-4686] Client movement when teleported Created: 14/Dec/12  Updated: 03/Dec/19  Resolved: 17/Sep/18

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.5, Snapshot 12w50b, Snapshot 13w10a, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w17a, Snapshot 13w18b, Snapshot 13w18c, Snapshot 13w19a, Snapshot 13w21b, Snapshot 13w26a, Minecraft 1.6.2, Minecraft 14w33c, Minecraft 14w34b, Minecraft 1.8-pre1, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.1-pre4, Minecraft 1.8.1, Minecraft 1.8.8, Minecraft 15w35e, Minecraft 1.8.9, Minecraft 16w02a, Minecraft 16w05a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 16w07a, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.2, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.9.4, Minecraft 1.10 Pre-Release 1, Minecraft 1.10, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w44a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w48a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w10d, Minecraft 18w11a, Minecraft 18w14b, Minecraft 18w15a, Minecraft 18w16a, Minecraft 18w19b, Minecraft 18w20a, Minecraft 18w20c, Minecraft 18w21a, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 1.13.1-pre1, Minecraft 1.13.1-pre2, Minecraft 1.13.1, Minecraft 1.13.2
Fix Version/s: Minecraft 1.7.10, Minecraft 18w43a

Type: Bug
Reporter: Jesper the End Assignee: Rikard Herlitz
Resolution: Fixed Votes: 138
Labels: /tp, movement, teleport, visual

Attachments: GIF File 13e3x.gif     PNG File 2012-12-14_22.09.17.png     PNG File 2012-12-14_22.09.27.png     PNG File 2012-12-14_22.09.36.png     PNG File 2013-04-13_17.42.28.png     Zip Archive New World-.zip     Zip Archive tp on a clock.zip    
Issue Links:
Bonfire Testing
testing discovered MC-120545 Teleportation wraps rotation angles c... Open
Duplicate
is duplicated by MC-9136 Remove travel time for teleporting Resolved
is duplicated by MC-13294 / Resolved
is duplicated by MC-18943 Client getting extra frames while tra... Resolved
is duplicated by MC-28476 Teleporting showing what's in between... Resolved
is duplicated by MC-66841 Teleportation is not seamless anymore Resolved
is duplicated by MC-67740 Relative teleporting bug Resolved
is duplicated by MC-68222 teleport lagg Resolved
is duplicated by MC-69699 Glitchy relative teleporting Resolved
is duplicated by MC-70073 Seamless Teleportation is broken Resolved
is duplicated by MC-72135 /tp will show 1-3 frames of the middl... Resolved
is duplicated by MC-87075 Relative teleportation jitters and fl... Resolved
is duplicated by MC-95542 Smooth teleporting no longer works Resolved
is duplicated by MC-96297 Teleport Resolved
Relates
relates to MC-14861 teleporting using commands resets the... Resolved
relates to MC-94168 Items fall into opening shulker Open
relates to MC-94738 Entity movement happens independently... Resolved
relates to MC-122118 /tp @s ~ ~ ~ acts like an absolute te... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

The bug

Currently, when teleporting a player (either relatively or absolutely) the motion of the teleport is visible sometimes, but not always. This behaviour is inconsistent even at 60fps.

How to reproduce

  1. Make two identical buildings 16 blocks apart from each other on the worlds X axis
  2. Keep executing the following two commands
    /tp ~16 ~ ~
    /tp ~-16 ~ ~

    → Note the occasional flash in between the teleports

Results

When a teleportation occurs, a flash is sometimes seen. Sometimes blocks even disappear until you move your mouse.
This flash is caused by extra frames generated during the teleportation. Causing an image to be rendered from the position in between the start position and the destination. The disappearing blocks is a different issue that deserves its own ticket.

Expected

To either not see a flash at all, or see it all the time (at 60fps).

Possible fix

It appears that this happens because only one of the two previous position fields is updated when teleporting. Specifically, setPositionAndRotation updates prevPosX/Y/Z, but leaves lastTickX/Y/Z alone. Both of these fields are used to interpolate position (each in different contexts), and only using one causes this bug. (Side note: I'm not entirely sure why there are two fields that have more or less the same purpose - perhaps they can be merged).

This is my (pokechu22) fix (in NetHandlerPlayClient.handlePlayerPosLook):

EntityPlayer player = this.gameController.player;
double x = packetIn.getX();
double y = packetIn.getY();
double z = packetIn.getZ();
float yaw = packetIn.getYaw();
float pitch = packetIn.getPitch();

if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.X))
{
    player.lastTickPosX += x;
    player.chasingPosX += x;
    player.prevChasingPosX += x;
    x += player.posX;
}
else
{
    player.lastTickPosX = x;
    player.chasingPosX = x;
    player.prevChasingPosX = x;
    player.motionX = 0.0D;
}

if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Y))
{
    player.lastTickPosY += y;
    player.chasingPosY += y;
    player.prevChasingPosY += y;
    y += player.posY;
}
else
{
    player.lastTickPosY = y;
    player.chasingPosY = y;
    player.prevChasingPosY = y;
    player.motionY = 0.0D;
}

if (packetIn.getFlags().contains(SPacketPlayerPosLook.EnumFlags.Z))
{
    player.lastTickPosZ += z;
    player.chasingPosZ += z;
    player.prevChasingPosZ += z;
    z += player.posZ;
}
else
{
    player.lastTickPosZ = z;
    player.chasingPosZ = z;
    player.prevChasingPosZ = z;
    player.motionZ = 0.0D;
}

I update lastTickPosX/Y/Z by the delta if it is a relative teleport, and set it directly if it is an absolute teleport. Changing it by the delta is important - if we just set it to the new position, then there actually is a (subtle) pause as the camera stays in the new position for the entire tick rather than moving between the offset old position and the new position.

I also update prevChasingPos/chasingPosX/Y/Z, which are used to render capes. This keeps capes from spazing out when teleporting (but isn't too important to the core problem).

I don't touch prevPosX/Y/Z at all in this code, simply because any changes made would be overwritten by the call to setPositionAndRotation. It may be better to also adjust prevPosX/Y/Z by the delta, but I couldn't detect a significant difference and that would require tweaking setPositionAndRotation.

(note that MC-120545 needs to also be fixed for seamless teleporting)



 Comments   
Comment by Emre Kisacikoglu [ 12/Jul/19 ]

holy crap, they fixed it!

Comment by [Mod] Pokechu22 [ 03/Feb/19 ]

18w43a is the first snapshot for 1.14. I've added 1.13.2 to the list since it is still affected, though.

Comment by Piptypong [ 03/Feb/19 ]

Still getting this in 1.13.2

How??????

Comment by Jesper the End [ 28/Sep/18 ]

Fixed :O
I guess I'll have to make the Code IV now 🤔

Comment by XeroOl [ 23/Jul/18 ]

confirmed for 1.13 release

Comment by Yurihaia [ 17/Jul/18 ]

1.13-pre9

Comment by Yurihaia [ 08/Jul/18 ]

And 1.13-pre6.

 

Is there any talk of fixing this?

Comment by Yurihaia [ 16/Jun/18 ]

1.13-pre2 also.

Comment by Graham Vinson [ 10/Jun/18 ]

You can also see other teleporting players moving for a few frames. I'm pretty sure this is the same bug

Comment by Yurihaia [ 24/May/18 ]

and 18w21a

Comment by Hugman [ 19/May/18 ]

Affects 18w20c

Comment by Yurihaia [ 15/May/18 ]

And 18w20a

Comment by [Helper] Lord_Quadrato [ 18/Apr/18 ]

Tested and confirmed for 18w11a, 18w14b and 18w15a.
I would love to see this fixed, especially for the technical side of 1.13 and since this bug is really old (came up in 1.4.5)
Edit: Now also confirmed for 18w16a

Still happens in both 18w19a *and *18w19b

Comment by [Helper] Lord_Quadrato [ 10/Mar/18 ]

Confirmed for 18w10d.
Someone please update affected versions.

Comment by OnePointZero [ 23/Jan/18 ]

Confirmed for 18w03b

Comment by Yurihaia [ 13/Jan/18 ]

Also, confirmed for 18w02a

Comment by Yurihaia [ 13/Jan/18 ]

It was probably a coincidence, but it stopped it for a short while sometimes

Comment by Fabian Röling [ 04/Jan/18 ]

Are you sure that you're commenting on the right report? And pressing Escape pauses the game, how does that toggle an in-game behaviour?

Comment by Yurihaia [ 04/Jan/18 ]

Something interesting is that clicking escape toggles this effect (sometimes)

Comment by Yurihaia [ 04/Jan/18 ]

confirmed for 18w01a

Comment by Toby Esta [ 25/Jul/17 ]

Bug still relevant and extremely annoying - this needs to get more attention as it ruins many custom maps.

Comment by Basemaker5 [ 09/Jun/17 ]

Still happening in 1.12 (in case someone wants to update the affected versions)

Comment by mc pye [ 01/Apr/17 ]

17w13b confirmed

Comment by tanyuliang [ 12/Feb/17 ]

Still happening sometimes on 17w06a

Comment by Emre Kisacikoglu [ 05/Feb/17 ]

Can confirm. I made a lot of short puzzle maps that use relative teleportation, and the flashing really ruins it.
It is inconsistent, so sometimes I'm lucky and it looks smooth, other times I see a flash that completely gives away that you are teleported.
How is this unassigned

Comment by [Mod] Urielsalis [ 05/Feb/17 ]

Seems to be happening reliably for me

Comment by Naitron Bomb [ 05/Feb/17 ]

I really hope this gets fixed, this was one of my favorite features before it broke.

Comment by bob [ 06/Nov/16 ]

Ben are you experiencing this in the latest version?

Comment by Ben LeBlanc [ 06/Nov/16 ]

How many times is this gonna be reopened?
This is never getting fixed is it

Comment by bob [ 06/Nov/16 ]

Is this still an issue on the latest snapshot 16w44a?

Comment by Fefinix [ 16/Aug/16 ]

Confirmed for 16w32b.

Comment by Jesper the End [ 24/Jul/16 ]

Done.

Comment by user-f2760 (Inactive) [ 24/Jul/16 ]

Done.

Comment by Fabian Röling [ 24/Jul/16 ]

Ok, could you please update the description if you like and could some mod change him to the reporter then?

Comment by Jesper the End [ 24/Jul/16 ]

Even when the client constantly has 60 fps this issue sometimes does, and sometimes doesn't happen. You'd expect to either see 2 blended frames (since the server runs on 20 ticks per second) or no blended frames at all. Right now it's just random.

Comment by Fabian Röling [ 24/Jul/16 ]

That could be client lag.

Comment by Jesper the End [ 24/Jul/16 ]

Hmm, even if that is how it's supposed to be working then it still wouldn't be working as intended since sometimes it does generate extra frames in between and sometimes it doesn't.

Comment by Fabian Röling [ 24/Jul/16 ]

Doesn't this work as intended? If you, for example, make a repeating command block to teleport an armor stand 0.1 blocks in every tick into one direction, it looks really smooth because of the movement between the game ticks. Movement that gets controlled by the server and teleportation (also by the server) are the same for the client. If you for example have internet lag on a server and a player seemingly stands still for a while, you can then see the direction he went when you get the next positional data instead of the other player just disappearing.

Comment by Jesper the End [ 02/Jul/16 ]

Here's the world I always use to test if the bug still exists. (tp on a clock.zip)

Comment by libraryaddict [ 02/Jul/16 ]

As requested by md_5, a world which illustrates the difference between absolute teleports and relative teleports.

Easy way to tell the difference between the two types in the current version of MC is to be jumping as you click the buttons.

Comment by [Mod] md_5 [ 02/Jul/16 ]

Can someone please attach a world that shows this bug.

Thanks

Comment by nextgensparx [ 23/Jun/16 ]

Confirmed for 1.10

Comment by Florian Kator [ 04/Jun/16 ]

Confirmed for 1.10-pre1

Comment by nextgensparx [ 21/May/16 ]

Confirmed for 1.9.4

Comment by nextgensparx [ 01/May/16 ]

Confirmed for 1.9.3-pre2

Comment by nextgensparx [ 23/Apr/16 ]

Confirmed for 1.9.2 and 1.9.3-pre1

Comment by 7ERr0r [ 26/Mar/16 ]

Isn't the fix so simple as setting player's lastPosX = teleportX etc. to prevent animation when packet arrives?
This change shouldn't break any entity trackers, I hope.

Comment by Jesper the End [ 12/Mar/16 ]

I'm still able to reproduce in 1.9.1-pre3

Comment by [Mod] redstonehelper [ 12/Mar/16 ]

Anybody still able to reproduce?

Comment by Carl Junior [ 12/Mar/16 ]

This seems to be fixed in 1.9.1 pre-release 3! There is no longer a flash on the screen, and it only very rarely jitters if you're moving swiftly.

Comment by Carl Junior [ 26/Feb/16 ]

This is still an issue in 1.9 pre-release 4.

Comment by Gio [ 25/Feb/16 ]

Still in Minecraft 1.9 pre-release 3

Comment by Gio [ 20/Feb/16 ]

Most of the time you don't see the glitch. But sometimes you see it very clearly.

Comment by [Mod] redstonehelper [ 20/Feb/16 ]

In what way? Do we keep this ticket open?

Comment by Gio [ 20/Feb/16 ]

Sort of fixed in Minecraft 1.9 pre-release 2

Comment by Carl Junior [ 15/Feb/16 ]

This seems to still be an issue in 16w07a.

Comment by Carl Junior [ 10/Feb/16 ]

Still an issue in 16w06a.

Comment by Gio [ 06/Feb/16 ]

Still in 16w05b.

Comment by Carl Junior [ 03/Feb/16 ]

This is still an issue in 16w05a.

Comment by user-f2760 (Inactive) [ 17/Jan/16 ]

ryanzlion40@gmail.com:

Affected versions: Minecraft 1.4.5, Snapshot 12w50b, Snapshot 13w10a, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w17a, Snapshot 13w18b, Snapshot 13w18c, Snapshot 13w19a, Snapshot 13w21b, Snapshot 13w26a, Minecraft 1.6.2, Minecraft 14w33c, Minecraft 14w34b, Minecraft 1.8-pre1, Minecraft 1.8-pre3, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.1-pre4, Minecraft 1.8.1, Minecraft 1.8.8, Minecraft 15w35e, Minecraft 16w02a

Comment by Xilophor [ 17/Jan/16 ]

Update the issue to 1.8 instead of staying at 1.7.10, then maybe they will see it.

Comment by Carl Junior [ 13/Jan/16 ]

Still an issue in16w02a.

Comment by Jim Elvers [ 20/Dec/15 ]

That's minecraft is "smoothing" the movement between the start and end, for an instantanious teleport, you need no smoothing (no frames in-between teleports)

Comment by KingSupernova [ 20/Dec/15 ]

Yes, that's the bug report. Current teleports are not smooth. i.e. the player can see a flash of movement while moving.

Comment by Jim Elvers [ 20/Dec/15 ]

Well I have actually quite some situations where I could really benefit from having a smooth teleport I'd rather even have some in-between frames than not having a smooth teleport.

Comment by KingSupernova [ 20/Dec/15 ]

So have a tag to determine whether the bug happens or not? Great idea! Or, they could just fix the bug, and not waste time adding a useless tag.

Comment by Jim Elvers [ 20/Dec/15 ]

Why don't they just add a special tag for "Instant"
Like: /tp (target) (z) [instant] or /tp (target) (2nd target) [instant]
It defaults to false, for a smooth teleport.
If set to true, it will teleport without moving the hand and it won't have any in-between frames.

It seems like a good idea to me _

Comment by Elliot Elison [ 01/Sep/15 ]

Confirmed for 15w35e

Comment by Elliot Elison [ 01/Sep/15 ]

Has this problem been flixed or even worked on in the newest 15w35e snapshot? Because I would really love to see it fixed because I use teleports a lot to make minecraft adventure maps and those few frames between teleports ruin the experience.

Comment by KingSupernova [ 03/Mar/15 ]

There are over 3000 unresolved bugs. Be patient.

Comment by sanb_bans [ 03/Mar/15 ]

By the way Alexander bakradze is my old account.

Comment by sanb_bans [ 03/Mar/15 ]

When you freakin gonna fix it mojang??
Fix FIX FIX FIX FIX FIX FIX FIX FIX AND FIX FIX Every tp bug! Make teleports as seamless and as hidden as Possible as soon as possible please! And make sure that annoying stupid bug never comes back. If u can.

Comment by Alexander Bakradze [ 26/Jan/15 ]

Block's won't render when you are not looking at them.

Comment by Alexander Bakradze [ 26/Jan/15 ]

Maybe this bug is caused because of the new render system.

Comment by Sad Ghoster [ 23/Jan/15 ]

Confirmed for 1.8.1. (Mojang, for WHAT reason did you put this bug back in?)

Comment by Alexander Bakradze [ 22/Jan/15 ]

I hate this bug so much. It ruined every single hidden teleportation.

Comment by Alexander Bakradze [ 12/Jan/15 ]

Once and for all!

Comment by Alexander Bakradze [ 12/Jan/15 ]

Please fix it for minecraft! And teleportation maps.

Comment by Alexander Bakradze [ 12/Jan/15 ]

Then ask mojang to delete that new render system and teleportation will become more seamless.

Comment by Spake Miner [ 08/Dec/14 ]

Confirmed for 1.8.1

Comment by Avantir_Yihn [ 11/Nov/14 ]

Confirmed for 1.8.1-pre4

Comment by Spake Miner [ 25/Oct/14 ]

Confirmed for 1.8.1-pre3

Comment by Jesper the End [ 05/Oct/14 ]

Well it was fixed for a while, but the problem came back when the new render system was implemented.

Comment by Ben LeBlanc [ 01/Oct/14 ]

Maybe they should make a teleport an actual, INSTANTANEOUS teleport. The way you see entities and players fly off when teleported, along with this issue, both imply that it's actually just a very very fast noclip movement, which is obviously why it sometimes shows crap in-between.

Comment by Jesper the End [ 04/Sep/14 ]

Confirmed for 1.8

Comment by Nick Booth [ 01/Sep/14 ]

Confirmed for 1.8-pre3

Comment by BratrilliantGamer7 [ 22/Aug/14 ]

Confirmed for 1.8-pre1

Comment by Jesper the End [ 19/Aug/14 ]

confirmed for 14w34b

Comment by Jesper the End [ 09/Aug/14 ]

This bug is back in the latest snapshots (14w32d) can a mod reopen this issue?

Comment by Kumasasa [ 15/Jul/14 ]

Ok, resolved.

Comment by TrazLander [ 15/Jul/14 ]

Ya this was fixed back in January or so https://twitter.com/Dinnerbone/status/420956915578179584

Comment by Galaxy_2Alex [ 21/Jan/14 ]

Is this still a concern in the latest developement Minecraft version 14w03b / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Jesper the End [ 11/Oct/13 ]

ok so it is sort of fixed in 13w41a you do not see the movement but your velocity will still be reset and sometimes your hand moves. Resolve as fixed or keep it open?

Comment by Jesper the End [ 11/Oct/13 ]

this might be fixed in 13w41a or maybe I'm just having a lot of lagg. I'll do more testing...

Comment by Jesper the End [ 02/Jul/13 ]

well, I guess we're just going to have to all play at 20 fps

Comment by Jesper the End [ 24/Jun/13 ]

confirmed for 13w26a

Comment by Jesper the End [ 27/May/13 ]

confirmed for 13w21b

Comment by Jesper the End [ 26/May/13 ]

try teleporting using a command you typed in chat, you will see your hand moving
and yes the velocity is reset when teleporting. Just fly up very high in creative, let yourself fall. and use /tp @p ~0 ~0 ~1 and you will see you start to fall again.
Sure, this glitch is also caused by the frames in-between ticks. But if you don't want to see the teleportation, mojang has to fix all of these 3 issues.

Comment by Ian Fiveonethreethree [ 26/May/13 ]

The hand was moving because of a button press, not because of teleportation. Also, velocity isn't changed by teleportation. This glitch is caused by the way Minecraft renders frames in-between ticks in order to produce smoother-looking animation.

Comment by Jesper the End [ 11/May/13 ]

confirmed for 13w19a

Comment by Jesper the End [ 07/May/13 ]

confirmed for 13w18c

Comment by Jesper the End [ 28/Apr/13 ]

confirmed for 13w17a

If you want to fix this you have to fixt these 3 things:
-stop the hand from moving when teleported
-make sure you don't see any frames during the teleportation
-make sure the velocity stays the same when you teleport

Comment by Jesper the End [ 28/Apr/13 ]

my issue might be related/a duplicate of this issue: MC-14861

Comment by Ian Fiveonethreethree [ 13/Apr/13 ]

It's still in existence in 1.5.1. It's actually causing problems in a custom map that I'm making. I frequently need to teleport the player to rooms that look almost the same as the room they were in. It's supposed to be unnoticeable, but since this bug exists there is somewhat of a 'flash' when they teleport.

In my opinion, teleportation should be seamless, without rendering of the space between the start and end locations in-between the two ticks.

Comment by Kumasasa [ 03/Apr/13 ]

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Yoann Petremann [ 05/Mar/13 ]

Still in 13w10a

Generated at Sun Jan 12 12:05:24 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.