Skip to content

Instantly share code, notes, and snippets.

@gigaherz
Last active October 13, 2020 17:46
Show Gist options
  • Save gigaherz/efa0f296275c42388b574c579b4fc420 to your computer and use it in GitHub Desktop.
Save gigaherz/efa0f296275c42388b574c579b4fc420 to your computer and use it in GitHub Desktop.

Terminal-free IntelliJ IDEA configuration

These instructions assume that you have created the project folder as described in the Getting Started page, and are meant to be used in place of steps 4+ of that page.

  1. Launch IDEA and choose to open/import the build.gradle file, using the default gradle wrapper choice. While you wait for this process to finish, you can open the gradle panel, which will get filled with the gradle tasks once importing is completed.
  2. Run the setupDecompWorkspace task (inside the forgegradle task group). It will take a few minutes, and use quite a bit of RAM. If it fails, you can add -Xmx3G to the Gradle VM options in IDEA's gradle settings window, or edit your global gradle properties.
  3. Once the setup task is done, you will want to run the genIntellijRuns task, which will configure the project's run/debug targets.
  4. After it's done, you should click the blue refresh icon on the gradle panel (there's another refresh icon on the main toolbar, but that's not it). This will re-synchronize the IDEA project with the Gradle data, making sure that all the dependencies and settings are up to date.
  5. Finally, assuming you use IDEA 2016 or newer, you will have to fix the classpath module. Go to Edit configurations and in both Minecraft Client and Minecraft Server, change Use classpath of module to point to the task with a name like <project>_main.

If all the steps worked correctly, you should now be able to choose the Minecraft run tasks from the dropdown, and then click the Run/Debug buttons to test your setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment