MCP Mod System: Eclipse Setup Tutorial
From Mod Coder Pack
MCP Mod System: Eclipse Setup Tutorial
This tutorial will show you one of the ways to setup eclipse to properly work with mcpmf mods.
This is the setup I am currently using, and it works nicely, surviving gracefully to the cleanup/decompile cycle.
Pre-requisites:
Eclipse 3.5 or 3.6 (not tested on other builds)
MCP-MF 1.4(MC 1.5_01) or 1.5(MC 1.6.5)
Your mcpmf environment must be ready to be used. You should already have deobfuscated your client to proceed with this tutorial.
First of all, a little convention, to make it easier to understand the following steps.
I will refer to MF_HOME as the directory you have your SDK ready to run, in my particular case, it is: "C:\Java\mc\mcpmf_1.0_developer\mcpmf10_sdk".
- Create a new eclipse project. Keep it in your default workspace folder. We will call ours mcpmf_tut

- Click next
- Click on "Link additional source", browse for the folder MF_HOME/src/minecraft and click "Finish".

- Click on "Libraries" tab. Click on "Add Library" and select "User Library" from the list. Click "Next".
- (Optional Steps) We will only need to create this library once for every minecraft version. Click on "User Libraries"
- Click on "New..", type a name for your library (on my example, I name it MC_1.5_01 to make it easier to identify MC version) and click "OK"

- With your new library selected, click on "Add JARs..." and select "minecraft.jar" "jinput.jar" "lwjgl.jar" "lwjgl_util.jar" from your ".minecraft/bin" directory. Click "Open".
- Click on the arrow to the left of "lwjgl.jar" to expand it. Click on "native library location" and click on "Edit...". On the pop-up window, click on "External folder..." and select the ".minecraft/bin/natives" and click "Ok".

- Click "Ok" after you created you library.
- Select the library for you minecraft version. In this case, I will select "MC_1.5_01" and click "Finish". To create your library, follow the optional steps above.
- Click on "Add External Class Folder...". In the folder selection screen, select MF_HOME/conf/mcpms

- Click finish and you are all set to go
Now we need to create the launcher shortcut, so it starts properly for testing within Eclipse.
- Click on the "Run"menu item, and select "Run Configurations..."
- On the left side of the window, select "Java Application" and select the "New" button.
- Give it a name on the top of the right section, and make sure your project is selected.
- Click on the "Search..."button to select the main class. On the pop-up window, select "Start - MCP". Click "Ok".
- Now click on "Run" to test your configuration.
NOTE: Keep your modding files in the usual structure for mcpmf. In the current release, you must make your mod at the "minecraft" linked source, in the proper package in there. This will make sure that your recompile/reobfuscate cycle will work transparently.
Happy modding.