Warning
This template is no longer valid/working as everything it runs on has been deprecated and/or removed (IntelliJ dropped support for Gradle < 4.5, Forge removed its built jars from the repo, etc). Use an architectury-loom based template instead.
A fixed and ready to use template for minecraft forge modding on 1.8.9
with shadow plugin integrated including two useful artifacts. Tested flawlessly on IntelliJ IDEA Ultimate 2022.2
java 8
gradle 3.1
shadow 2.0.4
minecraft 1.8.9
forgegradle 2.1-SNAPSHOT- Clone this repository.
- Import
build.gradleas a project. - Let it configure.
- Run
setupDecompWorkspacein Gradle:Tasks > forgegradle > setupDecompWorkspace - Reload gradle project.
Check out #build, #run and #artifacts for more information.
Note: If the build ever finishes with an error looking like
duplicate entry, then runcleanin Gradle:Tasks > build > clean
Run build in Gradle: Tasks > build > build
Output .jar will be located in
build/libs/
Run genIntellijRuns in Gradle: Tasks > forgegradle > genIntellijRuns
This will create the run configurations.
Note: you will need to change the classpath module to.main
You should add
CopyResourcesfrom #artifacts as aTask before launchand drag it in front of build.
Note: If the artifacts are not detected on setup, you might need to restart your IntelliJ.
I have included two useful artifacts that I always use when developing mods:
CopyModcopies the mod from your #build folder into your%appdata%/.minecraft/modsCopyResourcescopies the resources folder to yourbuild/classes/mainso they are accessible in the development environment