You can look in the GuiIngame class, method "renderGameOverlay", to see how the debug information is displayed; it is normally toggled by "GameSettings.showDebugInfo" so you can copy the code for the coordinates from that block; to show it in the bottom-right use "ScaledResolution.getScaledHeight()" and "ScaledResolution.getScaledWidth()" to offset it relative to the lower-right corner (if placed in the upper-left you don't need to offset it, otehr than adding 1-2 so it isn't right against the edge). There are already variables set to this in the method.
Note that the aforementioned assumes that the class and method names (or rather, what MCP decided to call them) did not change between Beta 1.7.3 and 1.6.4. If you can't find it based on these names you can search for "Beta 1.7.3" and look for it in code like the following:
You don't actually need all of that formatting if you just want to display integer coordinates, as I do in my custom GuiInventory class to display your position in the inventory:
Also, you can show the player's position based on their feet (like modern versions) by using player.boundingBox.minY instead of player.posY (both are displayed in 1.6.4, for example, a feet position of 11 is an eye level of 12.62, hence the still-popular claim that y=12 is best for diamonds).
You need to subtract the width and height of the string as otherwise it will render off the screen; for example, this is how the copyright notice on the main menu is placed in the lower-right (the height of text seems to be constant and subtracting 10 as shown leaves a space of 2 pixels from the edge, same for -2 from the width); in your case you'd replace the text with your coordinate string and width/height with the values from ScaledResolution:
String var10 = "Copyright Mojang AB. Do not distribute!";
this.drawString(this.fontRenderer, var10, this.width - this.fontRenderer.getStringWidth(var10) - 2, this.height - 10, 16777215);
Just wanted to say, that this is for beta 1.7.3.
Anyways, I was wondering how I pull this off. I'm working on a mod that allows me to see coords without pressing F3 everytime
You can look in the GuiIngame class, method "renderGameOverlay", to see how the debug information is displayed; it is normally toggled by "GameSettings.showDebugInfo" so you can copy the code for the coordinates from that block; to show it in the bottom-right use "ScaledResolution.getScaledHeight()" and "ScaledResolution.getScaledWidth()" to offset it relative to the lower-right corner (if placed in the upper-left you don't need to offset it, otehr than adding 1-2 so it isn't right against the edge). There are already variables set to this in the method.
Note that the aforementioned assumes that the class and method names (or rather, what MCP decided to call them) did not change between Beta 1.7.3 and 1.6.4. If you can't find it based on these names you can search for "Beta 1.7.3" and look for it in code like the following:
In particular, this is the part that shows the coordinates:
You don't actually need all of that formatting if you just want to display integer coordinates, as I do in my custom GuiInventory class to display your position in the inventory:
Also, you can show the player's position based on their feet (like modern versions) by using player.boundingBox.minY instead of player.posY (both are displayed in 1.6.4, for example, a feet position of 11 is an eye level of 12.62, hence the still-popular claim that y=12 is best for diamonds).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
When I set the location of text to ScaledResolution.getScaledHeight() and ScaledResolution.getScaledWidth(), it doesn't appear
You need to subtract the width and height of the string as otherwise it will render off the screen; for example, this is how the copyright notice on the main menu is placed in the lower-right (the height of text seems to be constant and subtracting 10 as shown leaves a space of 2 pixels from the edge, same for -2 from the width); in your case you'd replace the text with your coordinate string and width/height with the values from ScaledResolution:
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
That worked, thanks a lot!