-
Notifications
You must be signed in to change notification settings - Fork 118
IntelliJ Environment Setup
IntelliJ will be the environment in which you will do all your modding. Download it here.
- IntelliJ: Link
Once you start IntelliJ for the first time. you'll be greeted by this very important theme selection window.
Using Darcula is advised as the light theme will burn your eyes after staring at it for too long.
After that IntelliJ will give you the option to Create New Project
.
Set the Project Type on the left to Maven and set your Project SDK to Java 1.8. (Navigate to the folder where you installed the JDK.)
Go ahead and give your mod whatever ID you desire.
Then save it into your my_mods
directory.
It'll open up to your newly generated pom.xml
file. Go ahead and copy paste this example pom.xml
into that space. Then press Import Changes in the bottom right corner.
Example pom.xml: Link
Now press Ctrl+Alt+Shift+S to open up Project Structure and click on Modules on the left. Go ahead and check off all your dependencies and hit Apply
.
All your code will go into your_mod\src\main\java
. Simply create a new file by right clicking on the directory and going to New > Class
. You can create directories by doing New > Directory
.
You can build your project by going to View > Tool Windows > Maven Projects
. It will open up this side window:
Go ahead and press the icon with the small m
in the corner.
Type in package
and hit execute! A jar file with your mod will be created in the directory specified by the pom.xml
.
<target>
<copy file="target/ExampleMod.jar" tofile="../lib/ExampleMod.jar"/> // tofile location is where you can find your compiled .jar file
</target>