PostFPS Display 1.5.2

Posts 19 of 9 · Page 1 of 1
FPS Display 1.5.2
Many of you who are wishing to create a Minecraft Custom Client want an FPS display somewhere in game. It doesn't matter why, or where, you just want to copy and paste stuff in it and call it yours. Well, here it is.

Code:
int fps = Integer.valueOf(Minecraft.debugFPS);
Firstly, we create an integer (int) which would be called fps. This integer uses already made counter of FPS, therefore making this really easy to do.
This calls the void from Minecraft.class.
Code:
var8.drawStringWithShadow("\2472FPS: " + whatever your integer name was, x, y, hex colour code);
Then we call the drawString void. Notice how for 1.5.2 we use var8 instead of fontRenderer. So we use var8.drawString to draw our string (text).
In the brackets we have our string "FPS: " and our int + fps. We then add the x and the y coordinates and our colour code. After closing the bracket add a semicolon.


My client uses x and y coordinates so that if you try to resize the game, the FPS stays in the bottom right corner and not somewhere lets say, 420, 400. You can use simple math to make your string adjustable.

To do this, you're going to have to call an integer from GuiMainMenu.class

Code:
GuiMainMenu.width - 50, GuiMainMenu.height - 12
This grabs the current width and height of the, lets say, JFrame or whatever minecraft uses.

Skid unfriendly-ish.

You should all know where to place all of this. But if not, it is supposed to go in GuiInGame.java
Quote Originally Posted by OP
Skid unfriendly-ish.
.
..
...
I know you only left out the names of variables but why do people do this for things as simple as how to use guiIngame? Now for TTF chat or something I can see why, but when people make code "skid unfriendly" for simple stuff it makes me die a little inside.
(Good tut for beginners anyways)
Thanks but yeah, I know, still people gotta learn how to program.. :/
I just use fraps for my FPS
Quote Originally Posted by Smaug View Post
I just use fraps for my FPS
LOL WTF ? You should not really do that...

---------- Post added at 11:51 AM ---------- Previous post was at 11:50 AM ----------

Quote Originally Posted by LordPankake View Post
.
..
...
I know you only left out the names of variables but why do people do this for things as simple as how to use guiIngame? Now for TTF chat or something I can see why, but when people make code "skid unfriendly" for simple stuff it makes me die a little inside.
(Good tut for beginners anyways)
I figured how to do a TTF chat hehe . Ownage gave me a hint where the chat text is handled.
Quote Originally Posted by Caezer99 View Post
LOL WTF ? You should not really do that..
Is something wrong?
Or you know, just hit F3.
but F3 brings up all the debug stuff :P
Posts 19 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?