To fix your Minecraft world so that the coordinates displayed on the F3 debugging screen match what the MCPI API tells you with player.getPos()
or player.getTilePos()
, issue this Command in the game (requires Multiplayer, or a World generated with Cheat Codes enabled):
/setworldspawn 0 0 0
(to do this, press T or / and then type /setw
followed by the TAB key, and then 0 0 0. For some reason you can't type this command out in full on the Talk window.)