Skip to content

Setting up the project

Warning

This page is for the LabyMod 3 Addon API, which is no longer maintained nor supported. Visit https://wiki.labymod.net/pages/addon/ for the LabyMod 4 Addon API Wiki.

Warning

Please use our template project instead if you are using the latest Minecraft 1.16.5 version.

Download the Forge Mdk for Minecraft 1.8.9 or 1.12.2

We recommend you to use the Forge Mdk to create LabyMod addons for Minecraft 1.8.9 and 1.12.2, as it contains the deobfuscated Minecraft source code and libraries and it allows you to easily compile the addons.

  1. Download the necessary Forge Mdk at https://files.minecraftforge.net.

  2. Unpack the Mdk in a folder of your choice.

  3. Open up a command prompt in the folder you have chosen and run ./gradlew setupDecompWorkspace. This might take some time, as it downloads a bunch of artifacts. In the meantime you could drink a cup of coffee or do some other stuff you'd like to do.

  4. After this process is finished you should choose your IDE:

    • For Eclipse, you should run gradlew eclipse - this will create a folder called eclipse that you should select as your workspace after starting Eclipse.

    • For IntelliJ, you should run gradlew idea - this will create some project files. Just double-click the XX.ipr file to open the project in IntelliJ.

Add the LabyMod API for Minecraft 1.8.9 or 1.12.2

You can simply download the LabyMod API here and put it in a folder called libs that you have created in your project folder before. Afterwards you must add it as a dependency in your IDE:

For Eclipse

  1. Rightclick the project in your workspace and go to the Properties

  2. Open the Java Build Path tab on the left hand corner

  3. Switch to the Libraries-tab and click the button Add External JARs...

  4. A "Select File" prompt will appear where you should select the previously downloaded JAR

For IntelliJ

  1. Open the Project Structure at File -> Project Structure and select the tab Modules on the left hand corner
  2. Select your project's module and open the tab Dependencies
  3. Click on the "+"-sign and select "JARs or Directories"
  4. A "Select File" prompt will appear where you should select the previously downloaded JAR