I have been having some fun with JetBrain's IntelliJ Idea recently, and am starting to like it more than my old-favorite Eclipse. I didn't want to create an account on the MCP wiki, so I'm posting the tutorial here in the hopes that others can skip the hour or two of frustration that I experienced whilst trying to get this working.
Please Note: This tutorial assumes that you know how to setup an MCP working-directory along with platform-specific file/folder conventions.
After setting up the directory that your project resides in, it's time to fire up IDEA (I am using IDEA 12 with a modified Darcula theme). Begin by creating a new project:
The next step is important. We will specify the location of the project as the location of the directory we setup MCP in. Make the content root the src/ subfolder, and put the module in the .idea/ directory (Automagically created):
Click next and ignore the next Dialog (regarding Groovy). Once your project is open, we need to mark the Source root. Expand the src/ folder in the IDE and right click on Minecraft. Select Mark Directory As > Source Root:
Now, we can add the required libraries to the classpath. Go to File > Project Structure (or Ctrl+Alt+Shift+S). Select Modules and go to the Dependencies tab. Click the Green Plus button and select Jars or Directories. In the popup, brows to the directory of your project, and select the Libraries located in jars/bin (jinput.jar, lwjgl.jar, lwjgl_util.jar, minecraft.jar <important>) and click OK. Your Dependencies should now look like this:
Select OK. The final step is to create a Run Configuration. Select Run > Edit Run Configurations. Click on the Green Plus and select Application:
Give it a name. Set the Main Class to Start.java (Click on the elipsis on the right and type in Start, it should be the first result). IMPORTANT: In VM Options, add the following: -Djava.library.path=bin/natives. Set the working Directory to the jars/ subdirectory of the project. Click OK to save it:
The configuration should be selected next to the Green "Run" icon in IDEA. Click run and everything should compile and run!
And that's it! After you make your changes, you follow the standard MCP procedure of recompile and reobfuscate! (I haven't tried yet, but I'm pretty sure you can link these tools to IDEA also). Happy Coding!
For forge (And any other framework) You follow the same procedure as linking the libraries like we did for LWJGL, although, as TorelTwiddler pointed out, MCP has a special "lib" folder, which is automatically included when you are recompiling/reobfuscating your mod, and it's easiest to simply add this folder to the Dependencies List. I'll update the tutorial later this week when I have time.