Modding Minecraft – ForgeGradle setup and github

For a while now I have been thinking of creating a mod for minecraft. Something based around The Matrix’s construct. Some of the ideas had seemed a little far fetched but after seeing iChun’s Sync mod I really think it could be fun.

So first things first, I dived into setting up the latest version of Forge/MCP etc to start modding minecraft. With the latest version of minecraft (1.7) Forge and MCP have gone through a large overhaul. The new way of downloading and setting up everything is handled through Gradle. I had set up a Forge environment on an older edition but never really got around to doing much more then some basic tutorials. I am currently in a remote area for work and as such have a very slow internet connection. I started the install process but quickly got an error after it had downloaded a few things. I tried again but still got an “overlappingFIleLockException”. I searched the forums and google to no avail. I assumed something got messed up with whatever it was downloading but couldn’t seem to find or refresh it. Gradle caches what it downloads and there are no commands to clear it from the “gradlew.bat” file.  I tried rebooting, getting a new version of java, deleting the gradle folder and redownloading. Every time I got the same error. I finally came across the “-g” command that will allow you to specify a new folder for the cache. This worked for me.  Everything downloaded and installed (after a very long time).

After poking around the example file I decided to setup a github repo for my new mod. I have already used github and github for windows  before and had that already setup. I was however getting confused on how to get all my code (which is inside all the forge stuff) without changing the namespace or repo to one or the other (I wanted different names). I eventually decided to put all the gradle/forge stuff into the repo folder and use .gitignore to ignore everything but the folder my mod will be in.

Hope this helps anyone that came across the same problems as me.