Social Icons

Thursday, 3 May 2012

[TUT] How to make a client. | How to setup MCP & Eclipse | OOP | And more! | [TUT]

How to make a client!
Part 1 : Setting up MCP & Eclipse.

You will need a few things before you start coding your client.

1. Minecraft Coder Pack. (AKA MCP)
2. Eclipse. (You can use NetBeans or w/e you want, but I won't show you how to use that.)
3. My modded minecraft.jar (Optional, but I would recommend using it.)

Download link for my modded jar :
(Please note that this minecraft.jar is for Minecraft 1.2.5 so it might not work for older versions.)

Okey, so first download MCP, which can be found here :,
then just extract the whole folder onto your desktop, or wherever you prefer it to be.

Then download Eclipse, which can be found here :
(Download the Java IDE version, then follow the setup.)

So now when you have installed Eclipse, and downloaded MCP and extracted it somewhere,
locate your MCP folder and open it up.

Now you are probably seeing something like this :
[Image: gpMjYa]
I recommend that you run the updatemcp before doing anything.
Also .batch is for Windows computers and other files are for non Windows computers.

So now, open up the jars folder, and you will see this :
[Image: mabX73]
Now inside the jars folder, create a new folder called bin.
Then locate your .minecraft inside your appdata, and open it up, now look for the resources folder, copy and paste it into the jars folder in the MCP folder.

Now open up the bin folder inside the jars folder, and you can choose to use my modded minecraft.jar (Recommended) or use a clean one,
which I recommend using a clean minecraft.jar if you aren't going to use my modded one.

Just place the minecraft.jar inside the bin folder inside the jars folder now, you will also need to these things :
[Image: hW8fZc]
[Image: aJA7PZ]
All of these files and folders can be found inside your bin folder in your .minecraft.

Now when you are done with that, go back to the main MCP folder, where all the .batch files are stored,
now run the decompile script, it will open up a cmd or w/e it's called on other systems.
You will get 1 error inside, but don't worry, I will show you how to fix it.

After the script has decompiled and deobfuscated the source, open up Eclipse, and you will probably see something like this :
[Image: SnB98V]
You need to choose your workspace, so just follow me now.
Open up the browse function and look for your MCP folder, then choose it like this :
[Image: cGInVR]
You need to choose the eclipse folder, if you don't it wont work.

So when you've done that, just hit enter and it will load it up for you.

Now you are done with setting up MCP & Eclipse!

Part 2 : Fixing the error.
This one is really easy, just navigate to in the net.minecraft.src package, and look for the error, then just change this :
[Image: s2VPFS]
Into this :
[Image: r2Z6Am]

Now i'm just going to explain why that happened, it's pretty simple.

It's because the maximum a byte can hold is 127, which is actually less then what a short can hold.
While the maximum a int can hold is 2,147,483,647.

Part 3 : Creating the base for our client (OOP).

Because HF only allows 15 pictures maximum, I will just link you to the orginal post, it's on another forum, but w/e.
Click me for part 3!

Part 4 : Adding some utils.

Because HF only allows 15 pictures maximum, I will just link you to the orginal post, it's on another forum, but w/e.
Click me for part 4!

Part 5 : Basic hacks. (OOP)

Rza1337 - For inspiring me to code Part 5, and also inspired me to learn more about OOP

No comments:

Post a Comment