There used to be an incredibly minor and hard-to-notice bug in Minecraft: its “first-person” view was a third-person perspective. Instead of rotating around in-place, the camera was actually orbiting the point it was supposed to be in, therefore making it third-person (although up really close on an invisible point – technically an arcball camera). It was eventually fixed, but it took ten years, and it annoys me every time I play an older version of the game – and with projects like my Thirty server for Minecraft Classic, that’s reasonably often.

The issue might be best explained by showing…

I’ll first demonstrate with version 0.0.18a_02, since the offset is greater in really old versions, and this one has a bug in which the player spawns at (0, 0, 0) in multiplayer – and having a position that is exactly the corner of a block is perfect for demonstrating this issue:

4,000 FPS as well!

Notice how the camera is actually orbiting around the corner, where its position should actually be.

For comparison, here’s that same location in ClassiCube, an open-source reimplementation of Minecraft Classic, which does not have this issue.

This issue has existed since the inception of Minecraft. Here’s version rd-132211, the earliest version of Minecraft available to the public, dated the 13th of May 2009:

It’s hard to tell from the low-quality video, but it even seems to be present in the original “Cave game tech test”.

But why?

Here’s a snippet from a decompilation of rd-132211, chosen as it’s a small and unobfuscated codebase. This is the function responsible for setting up the camera’s position and rotation:

private void moveCameraToPlayer(float a) {
    glTranslatef(0.0F, 0.0F, -0.3F);

    glRotatef(player.xRot, 1.0F, 0.0F, 0.0F);
    glRotatef(player.yRot, 0.0F, 1.0F, 0.0F);

    float x = player.xo + (player.x - player.xo) * a;
    float y = player.yo + (player.y - player.yo) * a;
    float z = player.zo + (player.z - player.zo) * a;
    glTranslatef(-x, -y, -z);
}

That first glTranslatef call is the culprit: it moves the camera back 0.3 units on the Z axis before rotating it, causing it to orbit 0.3 units away from the location it should actually be at.

What’s the point of pulling the camera back a third of a block? I have no idea. That line can be removed, and the game gains a true first-person camera, without any issues:

When was it fixed?

1.44.4. Specifically, 1.14.6 pre-release 6. Under the changelog, it’s listed as:

Removed the camera pivot offset when in first-person view.

No JIRA ticket is listed, so it’s possible a Mojang employee found this themselves and were also annoyed by it.

1.14.4 pre-release 6 was released on the 15th of July 2019. This means this issue was present for 10 years, 2 months, and 2 days; 3,715 days in total. This is not the longest-lasting Minecraft issue, there are many on the JIRA that have been open longer. But it might be the only issue that’s existed as long as Minecraft has!

Prior to 1.14.4, the offset had decreased compared to earlier versions. Here’s 1.14.4 pre-release 5:

I’m not sure what the offset is in this version, but the fact block faces disappear as the camera aligns with them means it’s similar to the near plane (the closest the camera will render), and near planes are usually a really tiny value. In Beta 1.2_02, which also has a deobfuscated version, the offset is 0.1, and the near plane is 0.05.

The fact the offset was merely reduced and not removed suggests to me it may even have been intended, and not a bug - and if so, the purpose of it eludes me, especially if it always seemingly worked fine without it!

It might help to compare 1.14.3 and 1.14.4 to see if that was the only change made in regards to the camera, but 1.14.4 was the first version to gain official obfuscation mappings, and I don’t know enough about community mappings for newer versions of Minecraft to use them.