Minecraft 1.12 modding with forge – 1 – getting started

Hello everyone,

I have been messing around with modding minecraft for the last few days and noticed the lack of tutorials for 1.12. So I thought why not write a tutorial myself. Warning: the way I structured my code and the way I wrote the code may not be the ideal way!

Before I get started:
You should have an IDE installed. I will be using eclipse, but it is also possible to use IntelliJ. I will not be teaching java so you should do a java tutorial first if you don’t have any experience. Also I am using windows 10 and I have no idea how to do it on an other OS. Sorry D: (But it shouldn’t be so different I think). I am planning on releasing a part of this tutorial every friday 18:00 pm GMT+2.

Well lets get started!

  1. First you should download the latest version of forge (This tutorial will be for minecraft 1.12), I will be using forge-1.12-
    Go to the forge download site and download the mdk (Mod Development Kit).
  2.  Extract the downloaded file to an empty folder. You should see a lot of files:
    You don’t need all of these files to get started.
    You only need:

    • build.gradle
    • gradlew.bat
    • the gradle folder
    • The gradlew file (Not showed in picture because I forgot to add this when first making the tutorial)
    • The .gitignore file (Will be helpful in the future, this is not showed in the picture because I forgot this when making the tutorial. Sorry!)
  3. Copy these files in a new folder. I called my folder: “ForgeTutorial”. I will be referring to this folder as the root folder.
    The necessary files to get started
  4. While in the root folder make sure you have no files selected and while holding the shift button right click in the folder. A menu should come up and there should be an option “open command window here” or “open powershell window here”. Click on it and a command window or powershell window. Type: “.\gradlew setupDecompWorkspace” without the quotes and press enter. It will probably not skip as much as in the image but you should get “BUILD SUCCESSFUL”.
  5. If you are not using eclipse this step will be different for you, but if you are using eclipse follow this step. You have to execute one more command, type “.\gradlew eclipse” and press enter. Again it will probably skip less for you but you should get “BUILD SUCCESSFUL”.
  6. Now open eclipse and select a folder you want your workspace to be in. Press File→Import . This will open a prompt select General→Existing Projects into Workspace and click next. Make sure you have “select root directory” selected and click browse. Browse to your root folder and select it. Eclipse will see it as an project and not give any errors. Now click Finish.
  7. Now you are ready to start modding!

You probably also want to setup a git repository so you can share your code and people can help you. If you know how to do this you can just skip to the next part.

I’ll explain how to put the repository on github, there are other websites where you can put it but I am familiar with github.
To create a repository and upload your code follow the following steps:

  1. Create an account at github.com
  2. Create a repositry by clicking the plus button at the top right.
  3. Copy the url it gives you, the url should be in the following format: https://github.com/USERNAME/REPONAME.git
  4. Download git and install it
  5. Open a powershell/command prompt/terminal. If you are on windows you can hold shift and right click in the root folder. On other operating systems you may need to use the “cd” command to change your directory to the root folder
  6. run:
    1. git init      This will initialize the git repository
    2. git remote add origin URL FROM STEP 3       This will tell git where to upload the code
    3. git add .     This will add all of the files in the current repository to your git repo. Make sure you add the “.” !
    4. git commit -m “My first commit!”    This will tell git to remember the state of all your files at this point in time
    5. git push origin master     This will upload your code to the repository you made earlier!
  7. Now when you made changes you only need to run:
    1. git add .
    2. git commit -m “Message explaining changes”
    3. git push origin master

I hope that was easy to follow! If you have any question don’t hesitate to ask in the comments! Also if you saw any errors in the tutorial please let me know so I can fix it!
Next time we will start setting up the MainMod file.

Till next time!


Posted in Forge tutorial, Forge Tutorial 1.12.


  1. Hello, I had issues at Stage 4. I could not get it to complete. Here are my errors:
    * What went wrong:
    Execution failed for task ‘:recompileMc’.
    > Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK.
    It is currently set to “C:\Program Files\Java\jre1.8.0_241”

    * Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.

    Could you help? I know that 1.12 is a bit outdated, but it is preferred for the type of mod I’m doing (horses, before they updated the models).

  2. Followed your tutorial, was able view the mod in minecraft, however I get itemname not found when trying to give in the game. Is this the correct command /give @p modid:itemname ? I’m using my modid:ItemName. Thanks for for feed back

    • That should be the correct command (ofcourse replace modid with your modid and itemname with your itemname), do note that both modid and itemname cant have capitals in them

  3. Pingback: Setting up a Development Environment for Forge Modding – Doc Bok

  4. Undeniably imagine that that you said. Your favorite reason appeared to be on the internet the simplest thing to keep in mind of. I say to you, I certainly get irked even as other folks think about concerns that they plainly do not understand about. You controlled to hit the nail upon the top and defined out the entire thing without having side effect , other folks can take a signal. Will likely be back to get more. Thank you

Comments are closed.