Minecraft Forge Setup

The first thing you need to do is downloading Forge from website. We recommend that you should download the newest version of Minecraft Forge.

Next, you need to create a folder and name it so that it easy to recognize because you will keep all of your own code and forge in it. Once you have created this folder file, open up the zip file and paste all of the files in there. And then, open up a commandprompt by shift right clicking in this folder and run command below:

gradlew setupDecompWorkspace

After that, you need to run another command. In case happening an error while you run this command, you have to set the JAVA_HOME variable, and then go back to the user variables and create a variable called JAVA_HOME. This variable is similar to the PATH one, however, it should not include the /bin part. We recommend you should create JAVA_HOME on some pc’s.

If you are using eclipse you have to run this

Gradlew eclipse

If you are an IntelliJ IDEA user the command is as following:

Gradlew idea

IntelliJ is a similar to Eclipse program. If you know enough with Java or if you have used IntelliJ for a while and prefer it you can go with that, but if you don’t know which one to choose and this is your first time programming with Java you should stick with Eclipse, because in the tutorials we will use it.

Use following commands to download all things you need to start cosing with Forge.

For Mac, ensure that you use ./gradlew in the place of gradlew. If you run into missing LWJGL libraries after the setup do the following things.

  • Run ./gradlew setupDecompWorkspace then ./gradlew cleanCache.
  • And then find the file atForge-Location/build/unpacked/dev.json and replace anything that says 2.9.1-nightly-20131017 with 2.9.0 NOT: 2.9.0-nightly-20131017 just 2.9.0.
  • Run ./gradlew install setupDecompWorkspace eclipse –refresh-dependencies

After completing all commands above, open up Eclipse and point the workspace, which pops up during startup to the Eclipse folder in the ForgeMods folder you created before running the command. If you are missing the Forge library in your Eclipse after doing the setup run the following command to fix that.

Gradlew –refresh-dependencies eclips

If you want to launch Minecraft in your development environment you have to click on the little arrow next to the green launch button at the top. Then select Client or Server and Minecraft should start for you.

To get to the Minecraft source code, open the forge library which should be at the bottom of the library list. From code there, you can learn why and how something works in Minecraft but you can’t edit anything.

If Minecraft doesn’t have sound when you start it, you need to navigate to the Eclipse folder inside of the forge folder and copy the assets folder. Then paste it within the forge folder itself.

Leave a Reply

Your email address will not be published. Required fields are marked *