Creating Minecraft mods: setting up the environment

Note: I’ve created a two YouTube videos showing how to do this – part 1 & part 2.

Yesterday I posted a guide for installing Minecraft mods on a Mac. The logical next step to this is is creating your own mods. This is not quite as easy as installing them – you will need to know how to program in Java and there are a number of steps required just to set up the environment. This guide will show you how to set up the environment on your Mac. In this tutorial I’m using macOS High Sierra.

  1. Download and install Eclipse https://www.eclipse.org/downloads/
    This is the tool you’ll use to create your mods. It’s an integrated development environment (IDE) written in Java and primarily used to develop Java applications.

  1. Download and install the latest Java SDK (software development kit) http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

  2. Download the Forge Mdk (mod development kit) from http://files.minecraftforge.net

  1. Create a new folder in your home directory called moddev (You can call it something else, if you prefer). Unzip the mdk you downloaded in step 3 and copy build.gradle, gradlew.bat, gradlew, gradle to the moddev folder.

  2. Open terminal and navigate to the newly created folder with those four files in it. Then type:
    ./gradlew setupDecompWorkspace

This will take 5-10 minutes.

  1. Now run ./gradlew eclipse to set up Eclipse.

You’re ready to start creating your first mod! Forge have an example mod which you will have downloaded with the mdk in step 3. You’ll find it in the /src/main/java/com/example/examplemod directory. Copy the ExampleMod.java file into your new moddev directory and open it in Eclipse to have a look.

7 Replies to “Creating Minecraft mods: setting up the environment”

  1. Hi I’m having trouble with Task :recompileMc FAILED and I’m running gradle 4.7 and JDK 10.0.1. Let me know if you could give me some advice and I can followup with the stacktrace

    1. Use the gradle version that’s included in the forge download. It’s currently version 2.14

  2. “Could not determine java version from ‘12.0.1’.”
    Help please

  3. When I run the ./gradlew setupDecompWorkspace it leaves me with a “BUILD FAILED” and it says: Task ‘setupDecompWorkspace’ not found in root project ‘forge’.
    Anything you can tell me would help

  4. I have also noticed that my forge folder when downloaded does not have an eclipse folder

Leave a Reply to Connor Rydel Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s