1.6: Minecraft now does this for us.