-
In your file explorer (e.g. Finder):
- Unzip forge's MDK. This should create a new directory with the same name as the zip.
-
In a command line / terminal / console:
cd /path/to/unzipped/directory./gradlew setupDecompWorkspace
-
In IntelliJ IDEA:
- Select the "Open" button
- In older versions this may be labeled "Import" or "Import Project"
- Navigate to the unzipped directory (same one you
cd'ed to earlier)
- If a warning appears, "Trust" the project.
- If you're prompted to import the gradle project, do so. Otherwise, it should be done automatically.
- This will probably end in an error. Don't worry about it right now.
- Open
build.gradleand comment out everything- Cmd/Ctrl + A, then Cmd/Ctrl + /
- Select the "Open" button
-
In the same command line / terminal / console:
gradle wrapper --gradle-version 6.8.1
-
In IntelliJ IDEA:
- Replace the contents of
build.gradlewith the one in this gist. - If you get an option to "Load Gradle Changes", click it.
- If not, open the "Gradle" tab somewhere on the sidebar, and click the "Reload All Gradle Projects" button.
- Replace the contents of
-
In the same command line / terminal / console:
./gradlew genIntellijRuns
Last active
January 8, 2022 15:46
-
-
Save TheNullicorn/a21568268e73b7a57d56e0f40ba1c689 to your computer and use it in GitHub Desktop.
Setting up a 1.8.9 modding environment in 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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