Minecraft / Blogs

Setting up Minecraft Coder Pack to work with Eclipse!

  • 5
  • 2
  • comment2
  • playlist_add
  • share
  • more_horiz
avatar Dr Danco
Level 36 : Artisan Creeper Hugger
In this tutorial I will quickly show you how to get your Eclipse set up with Minecraft Coder Pack(MCP) so that you can test mods and compile them all right from Eclipse!

These are the thing's you must have in order to complete this tutorial:

Note: If you plan on using Modloader than you should install it normally into your minecraft.jar in "yourMCP/jars/bin/" before decompiling with MCP.

As long as you have these three things, were ready to get started!
1. First open Eclipse and click File-->New Java Project


I usually prefer to name mine the name and version, that way when new versions come out, I can just make a new project. But that's up to you.

2. Next, right click on your project in the left pane and go to Build Path-->Link Source

3. Click Browse and from there navigate to "yourMCP/src/minecraft".

Once the directory is selected, click OK and than Finish.

4. Now you'll notice there are ALOT of errors! This is because you need to reference some libraries in order for Eclipse to read the code correctly. Right click your project again and go to Build Path-->Configure Build Path.
Now that that's open, click Add External Jars, navigate to "yourMCP/jars/bin", select all the jars and click Open.

5. Before you close out of this, you'll need to set the native libraries. Expand lwjgl.jar click Native Library Location and than Edit on the right. Click external folder and navigate to "yourMCP/jars/bin/native" Click OK and your done with this step. If you have followed the steps correctly thus far than you should notice all the errors have subsisded (warnings are normal).

6. Now your almost done! Next thing you need to do is configure it to run the client correctly. One the top navigation bar of Eclipse, click Run-->Run Configurations. Once there, in the Main tab make sure your project is selected under project. Under main class click Search and select "net.minecraft.client.Minecraft". You can click RUN if you'd like to test it out and make sure it is working, otherwise you can just click Close.

7. Now your pretty much finished, you should be able to click RUN and it should run Minecraft. Now this last step isn't exactly require, but severely recommended as you will have a hard time testing your mods without it. Navigate to whatever folder you installed Eclipse in and open Eclipse.ini. At the bottom of this file you will see something like:

Now by default I think it may be set to something like 251mb? Anyway this designates how much memory Eclipse can use. The default amount is barely enough to run Minecraft, so you should allocate as much as you can spare. So if say for instance you wanted to allocate 512mb yours would look like:


Anyway, this concludes my tutorial on setting up the Minecraft Coder Pack to work with eclipse. Now you should be able to test your mods and compile your source code all from within Eclipse!
Thanks for reading, hope I could help :)
-Dr Danco

Comments : 2

star Login or register to post a comment.

Show Comments

1 - 2 of 2

  • FLAMESS123
  • Level 20
  • Expert Taco
  • September 20, 2013, 3:39 pm
PLZ update it for the new launcher :(
I really need an updated version.. BAD
thanks, FLAMESS123

Love the tutorial, it worked great.

Now how do I perform the same thing with the server sources ? Do I need a second project ? Anything else I should be aware of ?



1 - 2 of 2

Show Comments

Planet Minecraft



© 2010 - 2019