Skip to content

Development Environment

Ruben Taelman edited this page Jul 24, 2015 · 1 revision

Building and setting up a development environment

Notes before building

When it comes to minecraft modding we advice you to use either IntelliJ Idea or Eclipse because of their support for customization. Unfortunately we have found eclipse to be rather unreliable when it comes to building projects using ForgeGradle and thus we are unable to provide you with instructions to setup a reliable development environment (reliable, as in doesn't break every so often). Should there be anyone who does get EvilCraft working properly in an eclipse environment, then please by all means send us the steps you followed and we will add them to this readme.

EvilCraft uses Project Lombok -- an annotation processor that allows us you to generate constructors, getters and setters using annotations -- to speed up recurring tasks and keep part of our codebase clean at the same time. Because of this it is advised that you install a plugin for your IDE that supports Project Lombok. Should you encounter any weird errors concerning missing getter or setter methods, it's probably because your code has not been processed by Project Lombok's processor. A list of Project Lombok plugins can be found here.

Creating a lib folder for mod dependencies

EvilCraft provides compatibility with certain mods and because of this, you will require the deobfuscated jars and/or api's of these mods if you want to be able to run EvilCraft from an IDE. Luckely most mods provide a repository from which these required jars will automatically be downloaded when using our gradle build script. Mods that do not provide access to a repository will have to be downloaded manually and stored inside a lib folder somewhere in your filesystem (e.g. /home/user/mc_libs). In order to get EvilCraft to run from you IDE, you will have to download the following mod's deobfuscated jars and manually put them inside your lib folder:

IntelliJ IDEA

  1. Make sure you have read the section on Creating a lib folder for mod dependencies before continuing. In this example we will assume the lib folder is located at /home/user/mc_libs.

  2. Clone the EvilCraft source code using git and cd inside the EvilCraft directory

git clone https://github.com/rubensworks/EvilCraft
cd EvilCraft/
  1. Make a copy of gradle.properties_template and name it gradle.properties
cp gradle.properties_template gradle.properties
  1. Edit gradle.properties and point the value of libs_path to a your lib folder (be sure to use an absolute path)
libs_path=/home/user/mc_libs
  1. Execute the following gradle command to setup your workspace and create the necessary idea project files:
./gradlew setupDecompWorkspace idea genIntellijRuns
  1. Open the EvilCraft.ipr project file using IntelliJ IDEA

  2. Install the IDEA Lombok plugin by going to Preferences > Plugins and searching for Lombok Plugin

  3. After installing the Lombok plugin, go to Preferences > Build, Execution, Deployment > Compiler and enable Enable annotation processing

  4. Select Minecraft Client from Run configurations and press the green play button. Minecraft should now launch with EvilCraft and all of its dependencies loaded :)