I want to show you how to set up a Forge workspace with the "quick and dirty" method.
1/10 - Pretty simple
To start modding we first need to install Forge. There are two ways to do this. One is the faster way and the other is a bit more complicated but has much more advantages.
I'd recommend using the advanced installation covered in the next tutorial.
|Only one mod per workspace||Several mods with one Forge workspace|
|Each workspace has to be updated separately||Updating Forge for all mods in one task|
The first thing we have to do is to download the correct version of Minecraft Forge. To do this we go to files.minecraftforge.net. On this website we search for your MC version and choose the Forge version designated as recommended for this MC version. For MC 1.7.2 this would be Forge build 220.127.116.110.
Now we click on the download button for the "source" of this Forge version. This will start the download of a .zip file. We extract it anywhere with WinRar or IzArc. This will be our root directory. We name it "Forge".
Now we have to open up a command prompt in this directory and type
This will run the Forge installer.
Note that this only works if you run the command while you're inside the correct directory. The directory needs to contain the file gradlew.bat.
If you're on a Mac, you need to write "bash" in front of every command I'll mention here.
On Linux, you need to add "./" at the beginning, so that you get "./gradlew".
If we now get an Error mentioning we haven't set the JAVA_HOME variable, we have to create a new environment variable called "JAVA_HOME". The value of this variable is the path to your JDK directory, but without the \bin at the end.
Now we rerun and it should work.
When the downloads and the decompiling of Minecraft has finished (can take some minutes) we have to create the workspace for either Eclipse or IntelliJ IDEA.
If you want to use Eclipse you have to run this command:
If you are familiar with IntelliJ IDEA and want to use this IDE, type this command:
If you want to use IntelliJ IDEA because you have worked with it before, then just use it. For the ones who never worked with either Eclipse or IntelliJ, I recommend to use Eclipse because this is the IDE I will use in this tutorials.
To load the workspace in Eclipse, we launch eclipse.exe and wait for the Workspace dialog to appear. When this dialog opens we press the "browse" button and navigate to the eclipse folder in the Forge root directory. We select this directory and press OK to load the workspace. If the "Welcome" screen appears, we close it.
If the Forge library doesn't appear in the package explorer, we have to run this command:
gradlew --refresh-dependencies eclipse
Now we can launch Minecraft out of your workspace with the green "run" button in the top tool bar. We select, if we want to start Client or Server and wait for Minecraft to start.
When we start a server for the first time, it will crash immediately, because we need to agree to the minecraft EULA first. To do this, open the file "eula.txt", which is created when you run the server, and change the eula setting from false to true.
To get the MC source code, we can open the Forge library in the package explorer. It should be near the bottom. We are not able to edit code there but we can see how everything works.
Also we will find a file called "examplemod.java". This is an example provided by Forge. We can take a look at it, but actually it's not necessary, so we can delete it.
If Minecraft doesn’t have sound when we start it, we have to navigate to the eclipse folder inside of the forge folder and copy the assets folder. Then we paste it within the forge folder itself and Minecraft should have sounds.
If you want to report modding problems, please make sure to include the code in a pastebin link or something else! Don't just write "It doesn't work", otherwise your post will be deleted. For more complicated problems, please use the troubleshooter form.