Building IC2 Refactored¶
Windows PowerShell¶
Run from the repository root:
The project uses the Spotless Gradle plugin with Google Java Format for Java sources and whitespace/newline cleanup for selected project files. spotlessApply applies those formatting rules. It does not compile the mod or prove that the code is correct, so always run build afterward.
Linux or macOS¶
Find the JAR¶
After a successful build, check:
Use the regular mod JAR for installation/testing. If multiple artifacts are present, read the filenames and avoid source, Javadoc, or development artifacts unless you specifically need them.
Run the development client¶
Windows:
Linux/macOS:
If the build fails¶
- Run
spotlessApplyfirst. - Run
buildagain and capture the complete output. - Fix the first compilation/test error rather than only the final
BUILD FAILEDline. - Check the Java version and the Minecraft/NeoForge versions configured in
gradle.properties.
Formatting can fix a formatting-check failure, but it does not normally resolve missing imports, missing classes, or incompatible APIs.