To do this, it's a little tricky. It's assumed that you have already cloned the repo and run the gradle tasks necessary.
- Open IDEA
- Select "Import Project"
- Navigate to the cloned repo, and inside of the
eclipse
folder, choose theClean
orFML/Forge
folder, depending on what your working on (If you don't know, you probably want theFML/Forge
folder). - Select the
.project
file inside of the folder you navigated into, and hit OK. (Make sure you click the button to show hidden files if you don't see the.project
file. (It's the last graphic button on the toolbar)) - All the default settings should be fine (unless you want the
.ipr
project format instead of the.idea
project format; it doesn't matter), so click Next. - Verify that the correct project is there, and click Next.
- Make sure you have the correct JDK selected and click Finish. IDEA will now convert the Eclipse project to an IDEA project.
- Once IDEA has set up the project, open the Project Structure (Command + ; on Mac, I assume Ctrl + ; on non-Mac. It's also the second to last graphic button on the top-right toolbar.)
- From the left-hand sidebar, select Modules, and make sure that in the tabbed window, you're in the Sources tab.
- From the right-hand sidebar, click on the X next to "main/java", "main/resources", and "test/java". IDEA is erroring on them because they're under a different content root. Also, if you see the "build" folder in your folder view, exclude it. If you don't, don't worry about it.
- On the top of the right-hand sidebar, click Add Content Root, and select the "src" folder in the root directory of the repo and click OK.
- IDEA should automatically detect the sources and catagorize them accordingly. You can tweak with them if you'd like. Otherwise, hit Apply and OK.
At this point, you've setup your devspace for FML/Forge. If you'd like to run MC from IDEA, you will need to do the following:
- From the run configurations dropdown, click Edit Configurations.
- Click the + icon in the top right, and choose Application.
- Enter in the information shown in the text files below for what you want to run (e.g., if you want to run the Client, look at the runClient.txt file below. For server, look at runServer.txt.)
- After that, give the configuration(s) a name, save, close the dialog window, and choose one to run.
Everything should work at this point. Let me know if it doesn't.