Blogs Article

Minecraft coding tutorial (Mods & clients).

  • 6,914 views • 2 today
  • 1
  • 1
  • 1
DataFaize
Level 15 : Journeyman Miner
0
Well, hello.
I know this website is full of ignorant little 12 year olds.
But here goes, my name is DataFaize and this is a minecraft coding tutorial.
What you're going to need:
#1. an IQ over 40.
#2. Decent knowledge of java programming. java != JavaScript.
#3. Decompiled minecraft client. Sure there are plenty of tutorials on this website about this.
#4. An IDE, most preferably net beans or eclipse.

How to code:
Okay, so what you're going to need to do first is open your decompiled minecraft client which you decompiled with MCP (Minecraft coders pack) in your IDE.
When open you should see packages & folders in the IDE class bar ( I'm using eclipse)
Navigate to "Net.minecraft.src".

once inside this package/folder find GuiInGame.
GuiInGame is the class which renders the Gui on to minecrafts screen.
Locate the debug infomation (CTRL F> "DEBUG")
and add a Else statement to the } @ the end.
Inside your else statement you can put the Gui code.
This could be coded allot more OOP, but you're new to minecraft coding, you should google "Java OOP tutorial"
Next We are going to want to draw a String.
Minecraft has a built in method on drawing strings "drawString(fontRenderer, String, par1, par2, color code);
We can use this to draw text on the GUI. Mine looks like fontrenderer.drawStringWithShadow("DataFaizes' super sexy client", 2,2,0xffffff);
We can also use the "drawRect" method and the "drawGradientRect" method.
There, we made a basic GUI for our mod or client.

TIPS:
Insted of using if statements for strings, use logical operators.
learn to coding bloody java.

Thanks,
DataFaize
Tags

  Have something to say?

DataFaize
08/10/2012 11:59 pm
Level 15 : Journeyman Miner
Also forgot, if you want to draw Ingame lines & cool things, learn LWJGL & OPENGL
1

Welcome