Setting up Modding Environment (Eclipse) - Jacob1225/pufferfish-minecraft-mod GitHub Wiki

Note: Steps shown were done on Windows 10. Setup on other operating systems may differ. This installation guide is for Forge 1.16.5 - 36.2.20. It uses Java JDK 1.8u311 and Eclipse IDE 4.16. If errors occur, check if you have other versions of Java JDK installed (they may conflict). Perform a clean installation of all software.

Step 1: Install Java JDK

  • Minecraft 1.16.x runs on Java JDK 1.8. Download and install jdk-8u311. (Default installation is acceptable)
  • Need to set path to JDK 1.8. Start Menu > (Search) Edit the system environment variables > Advanced > Environment Variables... > Select the variable called 'Path' under the System variables table > Edit... > New > (Type file location of installed JDK 1.8) C:\Program Files\Java\jdk1.8.0_311\bin > OK

image

jdk_setup1

jdk_setup2

jdk_setup3

Step 2: Install Eclipse IDE

  • Download and install Eclipse 2020-06 (4.16). Select 'Eclipse IDE for Java Developers'. (Default installation is acceptable, accept any unsigned files)

image

Make sure the selected JDK matches the one we installed in Step 1:

image

Step 3: Download mod project folder

  • See GitHub repository for the latest mod version, download the main in ZIP format on your machine. image

Un-zip the folder in your work directory and import the project [Step 4]

  • Or preferably clone the repository by Eclipse, and then open it as a project. The following steps demonstrate the process in detail:
  1. Copy the repository in your clipboard.
  2. On the Eclipse under Git repository tab, select "Clone a Git Repository"

image

The repository info will be populated in the opened window, you would need to add your Github user name and password and press NEXT

image

Eclipse will choose a default git location under your user account to clone the repository, if no change needed press Finish.

image

It will take some time to clone a local copy on your machine.

image

Step 4: Build mod with Gradle

  • Launch Eclipse and select a workspace or use the default.
  • Select File > Import... > Gradle > Existing Gradle Project > Next > Browse... > (Find the mod directory) .../pufferfish-minecraft-mod/teamPufferFish > Finish The project folder may take some time to import.

image

image

  • Click on the Gradle Tasks tab and navigate to teamPufferFish > fg_runs > genEclipseRuns (Double-click to execute)

ide_setup1_eclipse

What a successful build should look like:

image

  • Go back to the Gradle Tasks tab and navigate to teamPufferFish > ide > eclipse (Double-click to execute)

ide_setup2_eclipse

What a successful build should look like:

image

Step 5: Run mod

  • In the Gradle Tasks, navigate to teamPufferFish > fg_runs > runClient (Double-click to execute) to launch Minecraft Forge 1.12.x with mods. ENJOY!

ide_setup3_eclipse

image