Setting up the project
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.
Download the necessary Forge Mdk at https://files.minecraftforge.net.
Unpack the Mdk in a folder of your choice.
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.
After this process is finished you should choose your IDE:
For Eclipse, you should run
gradlew eclipse- this will create a folder called
eclipsethat 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:
Rightclick the project in your workspace and go to the Properties
Open the Java Build Path tab on the left hand corner
Switch to the Libraries-tab and click the button Add External JARs...
A "Select File" prompt will appear where you should select the previously downloaded JAR
- Open the Project Structure at File -> Project Structure and select the tab Modules on the left hand corner
- Select your project's module and open the tab Dependencies
- Click on the "+"-sign and select "JARs or Directories"
- A "Select File" prompt will appear where you should select the previously downloaded JAR