Skip to content

Latest commit

 

History

History
79 lines (61 loc) · 4.55 KB

ProjectSetup.md

File metadata and controls

79 lines (61 loc) · 4.55 KB

Project Setup

Java

Forge and Pixelmon will be running on Java 8 so you will need the Java JDK 8. It is important to get the version that works with your system's architecture so if you are running 32-bit make sure to get 32-bit and if you're running 64-bit then get 64-bit. Where you choose to get this is up to you but an easy way to get it is through AdoptOpenJDK as shown in this video.

Check if you downloaded this correctly by typing java --version in your terminal/command prompt.

IntelliJ

The second step will be downloading and installing IntelliJ Community version. This will be out IDE to create our project.

1.) Head over to Jetbrains' IntelliJ download page
2.) Select the OS you are using (Windows, MacOS, Linux)
3.) Choose the community version (you can use ultimate for free with a valid college email)
4.) Install IntelliJ
- Windows: Double click the executable and follow the instructions
- MacOS: Drag the application from the DMG and place it into Applications
- Linux: Decompress the tar file and run the idea.sh script

Forge MDK

Now that we have Java and IntelliJ setup, we will need our forge workspace setup.

1.) Download one of the many versions of the Forge MDK from Forge
- Depending on what version pixelmon is on, the recommended forge version will change.
- To find the recommended version, check out Reforged's website
2.) Find a spot for this to stay and extract the files into that folder
- I often keep a libraries folder in a Code folder where I put various libraries I need access to
3.) Open a command prompt/terminal up to this folder
4.) Run the setupDecompWorkspace command
- Windows: gradlew setupDecompWorkspace
- MacOS/Linux: ./gradlew setupDecompWorkspace
- Note: This will take a few minutes and this is normal
5. Open IntelliJ and click Import Project
6. Select build.gradle inside of the folder you chose to extract your forge mdk to
7. Once it is done setting up the project entirely, close out of intelliJ
8. Run the genIntelliJRuns command
- Windows: gradlew genIntellijRuns
- MacOS/Linux: ./gradlew genIntellijRuns

Minecraft Dev Plugin

To reduce some of of the boilerplate setup each time we want to make a new project, there is an incredibly helpful plugin for IntelliJ called the Minecraft Dev Plugin. With this, we can easily add Forge to our workspace as well as any other APIs with a helpful GUI menu.

1.) Find the Minecraft Dev Plugin from the IntelliJ Marketplace
- From the editor window, press <ctrl + shift + a> (<cmd + shift + a> for Macs) and search for plugins
- From the start screen, click the gear in the bottom right corner and find "Plugins"
2. Search into the marketplace "Minecraft Dev Plugin" and press install
2. Restart IntelliJ

Creating our Project

Now that we have all our tools setup, we just need to get our project made.

1.) Create a new project and select the Minecraft tab
2.) Select Forge as your API (You can include others if desired)
- When prompted, choose to put these in the same project instead of two separate projects if you're using Sponge 3.) Fill in the prompted boxes
- For the forge versions, pick the versions that go with the MDK you installed earlier
4.) Create the project and wait till its done being setup entirely
5.) Download the latest server jar from Reforged's website
6.) Create a folder inside of your project called libs (this is our library folder and can be called whatever you want)
7.) Open up your build.gradle and add compile files(libs/PixelmonJarName.jar) to your dependencies block
- Replace PixelmonJarname.jar with the full name of the Pixelmon jar you downloaded
- If you renamed the folder, you will have to change it here as well
8.) Refresh your project by clicking on the gradle tab on the right of your screen and pressing the circular refresh icon

Look through the rest of this Cookbook

Now that you have your project ready to go, its time for development. Look through this cookbook for examples and helper classes that will show you how Pixelmon works. Also check out the README.md for information on useful links such as the Reforged JavaDocs for easy reference to how Pixelmon's API functions

Good Luck!