Welcome to the ultimate guide on setting up and running SpongeForge, a powerful Forge implementation of the Sponge API. Here, we’ll take you through the steps for cloning the repository, building the project, and troubleshooting common issues along the way.
Prerequisites
- Java 8
Cloning the Repository
To properly clone your SpongeForge project, follow these steps:
- Execute the command to clone the repository recursively:
- Navigate to the SpongeForge directory:
- Copy the pre-commit script into the Git hooks directory:
git clone --recursive https://github.com/SpongePowered/SpongeForge.git
cd SpongeForge
cp scripts/pre-commit .githooks
Setup Your Environment
Before diving into building SpongeForge, you need to set up the environment:
.gradlew setupDecompWorkspace --refresh-dependencies
Remember, SpongeForge utilizes Gradle as its build system, which manages dependencies and build processes seamlessly.
Integrating with Your IDE
For Eclipse
- Execute:
- Import Sponge as an existing project (File > Import > General).
- Select the root folder for SpongeForge, ensuring “Search for nested projects” is enabled.
- Check Sponge when the building process completes and click **Finish**.
.gradlew eclipse
For IntelliJ
- Ensure the Gradle plugin is enabled (File > Settings > Plugins).
- Navigate to File > New > Project from Existing Sources > Gradle and select the root folder for SpongeForge.
- Ensure “Use default gradle wrapper” is selected.
- Select “Create separate module per source set”.
Running SpongeForge
For Eclipse
- Running .gradlew eclipse should have created the appropriate run configurations.
- When you launch the server for the first time, it will automatically shut down. Modify eula.txt to set eula=true to agree to the Mojang EULA.
For IntelliJ
- Run:
- Restart IntelliJ IDEA or refresh the project to generate the run configuration.
- Remember to modify eula.txt to set eula=true to comply with Mojang’s EULA.
.gradlew genIntelliJRuns
Building SpongeForge
After setting up your environment, simply run:
.gradlew
This will compile your SpongeForge project. On Windows, remember to use gradlew instead of .gradlew to trigger the Gradle wrapper.
The compiled JAR files can be found in .build/libs, with spongeforge-x.x.x-x-x.x-x.jar being the most relevant for your needs.
Updating Your Clone
To stay updated with the official repository, follow these three steps:
- Execute:
- Update submodules:
- Run the setup command:
git pull
git submodule update --recursive
.gradlew setupDecompWorkspace --refresh-dependencies
Troubleshooting
If you encounter issues, consider these tips:
- To resolve missing dependencies, restarting your IDE can refresh the Gradle plugin to pull in the latest dependencies.
- If things still aren’t working, deleting the .gradle folder in your user directory can help. Run through the setup steps again or try:
gradle cleanCache
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

