Way to extract Minecraft player coordinates in real time?

I want to find the “file” or the data that has my current coordinates and use my real time coordinates to be read by a program I’m designing in an IDE. Is there a way to do find my player coordinates in real time? I’ve looked into NBTExploerer, but it looks like it only saves my coordinates when I quit the program.


Solution 1:

The game saves about every 45 seconds, so this would be the best accuracy you'd get reading the player.dat file. If you want real-time, probably the easiest approach would be to play on a server and plug your program into the communication, e.g. modifying an open-source tool like Bungeecord which acts as a proxy merging multiple servers. Extracting the player position from the client-server communication would provide you with best real-time accuracy.