Shh, no one tell the Forge devs people are still supporting this ancient version…

There’s a million perfectly valid reasons you might want to set up a development environment for 1.12.2, and as long as you have a reason, you should absolutely be allowed to do so without judgement. If you’re just wanting to start modding, maybe go for a more recent version because you won’t get much support for 1.12, but if you’re updating an older mod, making something to complement other 1.12 mods, or whatever other reason, you’ve probably noticed it doesn’t really work anymore.

I spent a week talking with the few people who still offer some level of support and I’ve written up a quick dummies guide to getting a Forge development environment working in 1.12, with textures and everything!

Before we start…

You will need:
– Intellij IDEA – https://www.jetbrains.com/idea/
– Some version of JDK 1.8 (I recommend Adoptium Temurin) – https://adoptium.net/temurin/releases/?version=8

Caveat 1: This will only work for Intellij IDEA. Abandon Eclipse – honestly, I was using Eclipse since 1.4.7, and this switch was great anyway. Intellij is better, JetBrains are a solid company that make IDEs for many languages so if/when you branch out from Java, you can stay pretty uniform, just trust me that the switch is worth it.
Caveat 2: This setup requires an extra lil thing called FancyGradle. That’s what does most of the patching and fixing for older Forge versions. However, the download maven is hosted on a raspberry pi on the developers home network, and has been noted to randomly go down sometimes. Before you get started on anything, head to https://maven.gofancy.wtf/#/ and check the site is online. If you get a CloudFare response, its down – try again later, you won’t be able to complete the steps right now. If it’s up then you’re all good, continue!
Caveat 3: Don’t expect much, if any, help. I am not good at this kind of stuff, but I can try and give a helping hand in my Discord (please use the #minecraft channel) – but beyond that 1.12.2 is very much a wasteland now. The player community is still pretty active here, but modding is not, and many of the bigger modders and Forge team are actually very snobbish about using older versions. It’s not worth the debate, trust me.
Caveat 4: I’m not going to explain why each step works or what it does. I’m trying to keep this guide pretty dummy proof, because I know there’s actually a lot of modders who maybe don’t know much programming beyond making a new dirt block. That’s absolutely fine; we all start somewhere, and I was there once too. I want this guide to be low level for everyone to follow, so as long as you follow it exactly it should work.

With that out the way….

How to do the forge

Step 1:
Go to files.minecraftforge.net and download the MDK for version 2859. If you have old versions on your hard drive, just delete them, you need 2859 specifically as this is a later/more recent patch that fixes the Log4j exploit. Remember that? That was a while ago huh…
Extract the zip folder, rename it if you like, this is your workspace now.

Step 2:
Navigate to gradle/wrapper/gradle-wrapper.properties, and change the gradle version in distributionUrl to 7.5. It should look like:

distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip

Step 3:
Go back to the project’s root folder, and create a new file called settings.gradle. Paste the following:

pluginManagement {
    repositories {
        maven {
            name 'MinecraftForge'
            url 'https://maven.minecraftforge.net/'
        }
        maven {
            name 'Garden of Fancy'
            url 'https://maven.gofancy.wtf/releases'
        }
    }
}

Step 4:
In the default build.gradle, replace everything before the version line with:

plugins {
    id 'eclipse'
    id 'maven-publish'
    id 'net.minecraftforge.gradle' version '5.1.69'
    id 'wtf.gofancy.fancygradle' version '1.1.+'
}

Step 5:
At the end of build.gradle, add:

fancyGradle {
    patches {
        resources
        coremods
        codeChickenLib
        asm
        mergetool
    }
}

Step 6:
Open Intellij, and import your project.

Step 7:
In Intellij, go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle. Set “Build and run using:” to Intellij IDEA, and check that Gradle JVM is set to some version of JDK 1.8

Step 8:
In Iintellij, go to File -> Project Structure. Check the SDK is set to 1.8 in here too. Set the compiler output to a folder called “out” in your project root – you’ll probably need to create this folder.

Step 9 (Optional):
Replace the /src/main folder with your mods source code, if you’re updating an already existing mod. If you’re making something from scratch you don’t need to do anything here. (You can actually do this step any time. Just here feels right to my strange brain.)

Step 10:
Back in Intellij, click the Terminal tab at the bottom of the screen. Type .\gradlew genIntellijRuns

Step 11:
Go back to your project folder. Find the subfolder called build – delete the whole thing.

Step 12:
Bck to Intellij once more, and select the Gradle tab on the right side. Press the refresh button in the thing that opens. (You can follow progress to know when its done in the Build tab at the bottom – it’ll only take a few seconds.)

Step 13:
Once that’s done, click the dropdown in the top-right corner that probably says “Current File” right now. Change it to runClient, and press the Play button next to it.
Console output is sent to the Run tab at the bottom of the screen.

Step 14:
Ensure your game now:
– Loads to the main menu
– Loads into a game
– If you have existing code, make sure something works and especially make sure your assets are visible. Missing textures is a common error with 1.12.2 these days!

Assuming that’s all good – you’re done! Now you can get on with modding.

Common Issues and things that Google probably brings you here for

I get this error message!

Plugin [id: 'net.minecraftforge.gradle', version: '5.1.+'] was not found in any of the following sources

This means the gofancy maven is offline. Sorry, only option is to wait. If it’s been a while (a week plus) maybe open an issue on the GitLab just so the dev is aware its down again, but usually its just a transient issue that shouldnt last more than a day or so.
If you’ve checked the Maven repo is online, or you’re getting a similar error for Forge, double check that your settings.gradle is called settings.gradle and not settings.gradle.txt. You’ve made the file and Windows loves to add .txt to the end without asking you.

I don’t have any textures in-game!

This is the big one, because there’s a lot of different fixes for the same issue over the years, and some of those fixes now break it more. This is what I had the most trouble with! You need to ensure all of the following:
– You have FancyGradle set up (ie, following the guide above if you don’t already have it)
– You have “resources” included in your patches
– You DO NOT have any other fixes from google in your gradle about remapping sources and all that stuff. They’re outdated and incompatable.

Once you’ve verified those three things, go to your project folder and delete the Build folder. Go back to intellij, refresh your gradle, re-run .\gradlew genIntellijRuns, restart intellij, stand up and spin three circles while patting your head and run your game. You should now hopefully maybe have textures. Last two steps may not be required but better safe than sorry. If you still have issues, do the whole thing again but delete the out folder contents too.

CodeChickenLib crashes!

Yup. Unfortunately even with the FancyGradle patch I couldn’t get it working. You can set any other libraries that require it (e.g. some CoFH stuff) to compileOnly in your dependencies – that way your mod will still build but the other mods will not be available at runtime locally. To test features with those mods, you’re going to have to build your mod and test in a real game, sorry.

Did I help you?

Consider buying me a kofi! help to feed my addictio- I mean help to keep my brain functioning!

ko-fi.com/fureniku