Working code for Minecraft 1.5.2