Monday, August 25, 2014

Setup

Intro

I'm creating this blog as a way of tracking my own progress from Minecraft player (or more importantly, parent of Minecraft players...) to Minecraft modder.  I'm going to do my best to link to the resources I used, and they are myriad.  The idea of this blog, though, is to be sort of a soup to nuts guide.  It won't be the most detailed necessarily, but I plan to provide links to more details.  Please feel free to point out any glaring omissions or errors.  I am, after all, completely new to this, and am putting this together as a way to help others navigate these rather complex waters.

Download stuff

Obviously there are a bunch of things required for development.  Here are a few links:
  1. Minecraft.  This should be obvious.  As of the start of this blog I'm running 1.7.10.  I'll try to update with changes, but unless you see a reference to some other version, this is what I'm using.  You'll want to download the minecraft_server.1.7.10.jar for later also.
  2. Minecraft Forge. If you don't already have it installed, you need it.  I'm using version 10.13.0.  Make sure you also download the Source and the Javadoc packages, in addition to the installer for your platform.
  3. Java SDK.  Since Minecraft is Java-based, this should be evident.  I'm going to be using the most recent version of the Java 7 SDK, due to reports that Java 8 is not supported at the moment.
  4. Eclipse.  This is my preferred Java development environment, which happens to be free.  If you want to use something else, you're on your own, sorry.  I'm using Eclipse Standard 4.4.

Create a workspace

I have created a folder to put everything in one place, including Eclipse.  I have a separate install of Eclipse for doing Android development, so I don't get things too mixed up.  You certainly can just use a single install for everything, but don't blame me if you run into problems.

I put all the installers I'm using in the root of this folder, just in case I need to reinstall or reference a version.  Eclipse can just be unzipped, there is no fancy install process.  You'll also need to unzip the Forge source package, and you'll probably want to rename the directory to something shorter.

If you haven't already done it, you'll need to make sure that the path to your JDK is present in your PATH variable.  The Java developer website has instructions on doing this.  You'll also need to make sure your JAVA_HOME environment variable is set to the SDK install directory (NOT the \bin directory within it!) in order for the Forge tools to work properly.

Once you've done this, you can setup the workspace using the Forge magical tools.  There is a good intro to this process on the Forge website.  Here's a summary:
  1. Open a command prompt in your Forge source directory.  In Windows hold down shift, right click the directory, and choose "Open command window here" from the menu.
  2. Enter gradlew setupDecompWorkspace, hit Enter, and wait for the magic to finish.
  3. Enter gradlew eclipse and once more wait for the magic to finish.
With any luck this succeeded and you can fire up Eclipse.  Choose whatever workspace you want, and then Import the project.  If this doesn't work, you'll perhaps need to take a look at the detailed instructions on this page.  My sound didn't work, it wouldn't recognize the eclipse directory as a project, but after reading that page and playing a bit, I was able to successfully launch Minecraft with the example mod loaded.

Congrats!  You've done the preliminary work!  Next up: building the mod and running it in Minecraft outside of Eclipse...




No comments:

Post a Comment