-
Notifications
You must be signed in to change notification settings - Fork 9
Setting up development environment
-
First install Minecraft Forge version 1.7.10. WikiHow has a step-by-step tutorial for installing Minecraft Forge and adding mods. We recommend disabling other mods before trying BurlapCraft. We have tested these instructions on Ubuntu 14.04 and Mac; some version of them should work on other operating systems, but your mileage may vary. (We have been working with forge-1.7.10-10.13.3.1428-1.7.10-installer.jar.)
-
Download a copy of Forge source to setup your dev environment. You should get the recommended version of 1.7.10 here. The zip file we are using is called forge-1.7.10-10.13.3.1428-1.7.10-src.zip. After it has downloaded, extract its contents (rename this folder to forge for convenience).
-
Fire up your terminal/command window and navigate to the forge folder using the 'cd' command. Once you are within the forge folder in the terminal/command window, you will need to run the following command:
./gradlew setupDecompWorkspace --refresh-dependencies
This will download all the requirements to begin modding using Minecraft Forge.
- If you are on Linux or Max OS, you should always use
./gradlew
instead ofgradlew
. If this does not work, you can retry after runningchmod +x gradlew
. - This guide uses Eclipse because it is the general preference for an IDE within the Minecraft modding community. To set up the eclipse development environment, run the following command from within the forge folder:
./gradlew eclipse
- Once Eclipse is setup, your forge folder should contain the code for the example mod and should be good to go. To look at the code for the example mod, open Eclipse using the eclipse subdirectory within the forge folder as your workspace.
- You can also use IntelliJ as an IDE by importing the Gradle project. To do this go to File->Import Project. Then select the forge directory. Next choose Gradle project and point the Gradle project path to the build.gradle file. We recommend performing the remaining git and Gradle build instructions in this tutorial before creating the IntelliJ project.
- Next we need to install BurlapCraft into the development workspace.
- Create a new git repository in the forge directory:
git init
- Add BurlapCraft as a new remote:
git remote add origin https://github.com/h2r/burlapcraft
- Fetch the BurlapCraft source code into your workspace:
git fetch --all
- Finally overwrite the example code with BurlapCraft:
git reset --hard origin/master
and tell git to set the upstream branch
git branch --set-upstream-to=origin/master master
At this point, you should be able to push, pull and edit code in the BurlapCraft repository.
- If you see a lot of errors within the project, it's because you need to add the BURLAP java code library (burlap.jar) and the commands to tasks java code library (commandsToTasks.jar) to your project to resolve the missing dependencies. To add it to Eclipse's class path; Right click on "Minecraft" in the Project Explorer, selecting "Properties"; Click on "Java Build Path" on the left hand side; Select the "Libraries" tab; Press "Add External JARs..."; Browse to and select the "burlap.jar" file and the "commandsToTasks" file; Click OK until done; Right click on "Minecraft" in the Project Explorer and select "Refresh". The errors should no longer be present.
Now you should be ready to start [developing Burlapcraft] (https://github.com/h2r/burlapcraft/wiki/Developing-Burlapcraft).