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
Make two identical buildings 16 blocks apart from each other on the worlds X axis
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 (@unknown) 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)
Related issues
is duplicated by
relates to
testing discovered
Attachments
Comments


Still in 13w10a

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.

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.

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

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

confirmed for 13w18c

confirmed for 13w19a

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.

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.

confirmed for 13w21b

confirmed for 13w26a

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

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

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?

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.

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

Ok, resolved.

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

confirmed for 14w34b

Confirmed for 1.8-pre1

Confirmed for 1.8-pre3

Confirmed for 1.8

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.

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

Confirmed for 1.8.1-pre3

Confirmed for 1.8.1-pre4

Confirmed for 1.8.1

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

Please fix it for minecraft! And teleportation maps.

Once and for all!

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

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

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

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

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.

By the way Alexander bakradze is my old account.

There are over 3000 unresolved bugs. Be patient.

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.

Confirmed for 15w35e

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 _

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.

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.

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

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)

Still an issue in16w02a.

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

@unknown:
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

This is still an issue in 16w05a.

Still in 16w05b.

Still an issue in 16w06a.

This seems to still be an issue in 16w07a.

Sort of fixed in Minecraft 1.9 pre-release 2

In what way? Do we keep this ticket open?

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

Still in Minecraft 1.9 pre-release 3

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

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.

Anybody still able to reproduce?

I'm still able to reproduce in 1.9.1-pre3

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.

Confirmed for 1.9.2 and 1.9.3-pre1

Confirmed for 1.9.3-pre2

Confirmed for 1.9.4

Confirmed for 1.10-pre1

Confirmed for 1.10

Can someone please attach a world that shows this bug.
Thanks

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.

Here's the world I always use to test if the bug still exists. (
[media])

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.

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.

That could be client lag.

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.

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

Done.

Done.

Confirmed for 16w32b.

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

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

Ben are you experiencing this in the latest version?

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

Seems to be happening reliably for me

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 😞

Still happening sometimes on 17w06a

17w13b confirmed

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

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

confirmed for 18w01a

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

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?

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

Also, confirmed for 18w02a

Confirmed for 18w03b

Confirmed for 18w10d.
Someone please update affected versions.

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

And 18w20a

Affects 18w20c

and 18w21a

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

1.13-pre2 also.

And 1.13-pre6.
Is there any talk of fixing this?

1.13-pre9

confirmed for 1.13 release

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

Still getting this in 1.13.2
How??????

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

holy crap, they fixed it!