- Make sure Java 17 is installed on your computer
- Git clone the project:
git clone https://github.com/Scherso/ForgeTemplate/
- Run:
-
Unix in Terminal:
Note: If you plan to only build once add the
—no-daemon
flag to the build.cd ForgeTemplate ; chmod 755 ./gradlew && ./gradlew --refresh-dependencies build
-
Windows in Powershell:
cd ForgeTemplate ; .\gradlew.bat --refresh-dependencies build
- Check the directory
ForgeTemplate/build/libs
or Windows;ForgeTemplate\build\libs
For IntelliJ
- Open the project from
File > Open...
Select ForgeTemplate from it’s given file location. - Let the IDE collect dependencies and index the code. (this may take a couple seconds)
- Go to
File > Project Structure... > SDKs
and make sure an SDK for Java 17 is installed and selected, if not download it here
Test if the environment is set up correctly setup by clicking the refresh button in IntelliJ’s Gradle tab, if it has indexed properly with no errors do the following:
- Go to
ForgeTemplate > Tasks > loom > genSources
in the Gradle tab and rungenSources
- To build the mod as a jar run
ForgeTemplate > Tasks > build > build
. Gradle will create a new directory calledbuild
. - Once this process is done, the .jar file will be located in
build/libs
You can see this in your file tree.