Starting a new Minecraft mod

Starting a new Minecraft mod

My kids are really into Minecraft, and are interested in mods. Here’s a quickstart to getting an OS X dev environment set up with IntelliJ IDEA.

Prereqs

You should have the following already installed on your machine:

  • Minecraft (with purchased license)
  • JDK
  • IntelliJ IDEA

Get Forge Mod Development Kit (MDK)

  1. Go to the Minecraft Forge downloads page.
  2. In the “Download Recommended” section, click on the “Mdk” icon. You’ll be redirected to an ad-based download page.
  3. In a few seconds, you’ll see a red “SKIP” button in the top-right, click on
    it to begin the download.

As of this writing, the recommended file is forge–1.8–11.14.4.1563-mdk.zip

Set up a folder for development

I’m calling mine ~/dev/minecraft-potion-mod, since the initial mod I’m writing involves new potions. Here we extract it and create a new git repository:

mkdir ~/dev/minecraft-potion-mod
unzip ~/Downloads/forge-1.8-11.14.4.1563-mdk.zip -d ~/dev/minecraft-potion-mod
cd ~/dev/minecraft-potion-mod
git init
git add .
git commit -m 'initial commit'
./gradlew setupDecompWorkspace

IntelliJ

Generate the project files

./gradlew idea
  1. Open IntelliJ IDEA
  2. Click “Open”
  3. Open the generated .ipr file. In my case, it’s
    /Users/lorin/dev/minecraft-potion-mod/minecraft-potion-mod.ipr

IDEA will likely show you pop-ups:

  • Unregistered VCS root detected.
  • Unlinked Gradle project?

These are safe to ignore. Alternately, you can register your root git and link the gradle projects so IDEA stops nagging you.

Run Minecraft with the mod

  1. In the menu bar, to the left of the (likely grayed out) “Run” button that looks
    like a “play” triangle, click the drop-down, and choose “Minecraft Client”.
  2. Click the (now active) “Run” button.

This should launch Minecraft. If you click the “Mods” button, it should say
“Example Mod” as one of the mods.

You’re now ready for Minecraft mod development.

Advertisements
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a 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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s