Skip to content

Instantly share code, notes, and snippets.

@TheNullicorn
Last active January 8, 2022 15:46
Show Gist options
  • Select an option

  • Save TheNullicorn/a21568268e73b7a57d56e0f40ba1c689 to your computer and use it in GitHub Desktop.

Select an option

Save TheNullicorn/a21568268e73b7a57d56e0f40ba1c689 to your computer and use it in GitHub Desktop.
Setting up a 1.8.9 modding environment in 2022
  1. In your file explorer (e.g. Finder):

    1. Unzip forge's MDK. This should create a new directory with the same name as the zip.
  2. In a command line / terminal / console:

    1. cd /path/to/unzipped/directory
    2. ./gradlew setupDecompWorkspace
  3. In IntelliJ IDEA:

    1. Select the "Open" button
      1. In older versions this may be labeled "Import" or "Import Project"
      2. Navigate to the unzipped directory (same one you cd'ed to earlier)
    2. If a warning appears, "Trust" the project.
    3. If you're prompted to import the gradle project, do so. Otherwise, it should be done automatically.
      1. This will probably end in an error. Don't worry about it right now.
    4. Open build.gradle and comment out everything
      1. Cmd/Ctrl + A, then Cmd/Ctrl + /
  4. In the same command line / terminal / console:

    1. gradle wrapper --gradle-version 6.8.1
  5. In IntelliJ IDEA:

    1. Replace the contents of build.gradle with the one in this gist.
    2. If you get an option to "Load Gradle Changes", click it.
    3. If not, open the "Gradle" tab somewhere on the sidebar, and click the "Reload All Gradle Projects" button.
  6. In the same command line / terminal / console:

    1. ./gradlew genIntellijRuns
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
}
maven {
name = "jitpack"
url = "https://jitpack.io/"
}
}
dependencies {
classpath "com.github.asbyth:ForgeGradle:6f53277"
}
}
apply plugin: "net.minecraftforge.gradle.forge"
version = "1.0"
group = "com.yourname.modid"
archivesBaseName = "modid"
minecraft {
version = "1.8.9-11.15.1.2318-1.8.9"
mappings = "stable_20"
runDir = "run"
}
dependencies {
// ...
}
processResources {
// This will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// Replace stuff in mcmod.info, nothing else.
from(sourceSets.main.resources.srcDirs) {
include "mcmod.info"
// Replace version and mcversion.
expand "version": project.version, "mcversion": project.minecraft.version
}
// Copy everything else, that isn't the mcmod.info.
from(sourceSets.main.resources.srcDirs) {
exclude "mcmod.info"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment