MinecraftForge/MinecraftForge — pull request #1226 by williewillus (2014-07-14 01:06:26+00:00)
Title: Fix experience orbs spawning at 32x coordinates clientside

Since Minecraft 1.5, the NetClientHandler / NetClientPlayHandler has been handling experience orb packets incorrectly. While the packet is constructed on the server side with the coordinates multiplied by 32 like the other entity packets, it is NOT divided by 32 when processed on the clientside, unlike other entity packets.

As a result, all experience orbs (and custom subclasses!) will spawn at 32x their serverside coordinates on the client side and will thus be invisible for a second or two until the server sends another wave of absolute teleport packets to update their positions.

This patch divides the coordinates of the clientside constructed XP orb by 32, allowing them to appear immediately after spawning again. This restores the intended behavior, which was last shown in Minecraft 1.4.7.

This vanilla issue is tracked at https://bugs.mojang.com/browse/MC-12013 but has been largely forgotten by Mojang and will probably never be noticed nor fixed.

To test: Simply throw a bottle o' enchanting and observe how the orbs appear immediately and fly outward, whereas without the patch they appear with a delay.