This tutorial assumes you have already

Eclipse

  1. Open up Eclipse and (if you aren’t already there) switch to your “workbench”.
    workbench
  2. Go to File > Import > Existing Gradle Project and import the project. menu-import import-gradle-popup import-gradle-wizard import-gradle-select0
    import-gradle-select1
  3. Wait for the import/sync to complete
    import-sync0
    import-sync1
    import-sync2
  4. Go to Gradle Tasks
    gradle-tasks
  5. Run the eclipse task
    This will take a while as Forge downloads everything and sets up your modding environment.
    gradlew-eclipse
    gradlew-eclipse-exec
  6. Run the genEclipseRuns task to generate the run configs to run minecraft
    gradlew-genEclipseRuns
    gradlew-genEclipseRuns-exec
  7. Refresh your project
    Go to your project explorer, select your project and then select refresh
    refresh
  8. Choose your run configuration
    Go to the Run Configurations menu
    menu-run-configs
    Choose Java Application > runClient
    run-configs-popup
    Open the Run menu and select the runClient run configuration
    menu-run-configs-after
    All of these run configs launch minecraft.
    run-configs-list
    • runClient launches the minecraft client
    • runData launches minecraft in a special mode that only does the bare minimum required to automatically generate json files like recipes and blockstates.
    • runServer launches the minecraft server
  9. Run the game
    running
  10. Change package representation to hierarchical (optional)
    package-presentation
    package-presentation-hierarchical

Troubleshooting

When asking for help make sure to include your console log.
gradlew-genEclipseRuns-log

If your run configs fail to generate:

First try closing eclipse, then running gradlew genEclipseRuns from the command line, then opening eclipse back up.
If this doesn’t work but the .launch files generate in your mod’s folder properly, try importing them manually.
Do this by going to File > Import > Launch Configurations, selecting your mods folder and importing all run configs from there.
Before:
run-configs-before
run-config-files
After:
menu-import
import-launch-popup
import-launch-select
run-configs-after

1.2 - Basic Mod