Gradle and project layout
Set up Fabric Loom, SoulFire dependencies, Maven repositories, and project files for a plugin.
Это руководство доступно только на английском.
This page explains the build files in the plugin template. A SoulFire plugin is a Fabric Loom project that depends on SoulFire.
Published coordinates
| What | Value |
|---|---|
| Maven repository | https://repo.codemc.org/repository/maven-public/ |
| Plugin dependency | com.soulfiremc:mod |
| Release metadata | https://repo.codemc.org/repository/maven-public/com/soulfiremc/mod/maven-metadata.xml |
Pick the version that matches the SoulFire server you run.
CodeMC can lag behind GitHub releases. If your version is missing, build that SoulFire release tag and publish it to your local Maven repository.
Releases up to 2.9.0 also published com.soulfiremc:shared. Current releases keep those classes in mod, so do not add shared.
Repositories
com.soulfiremc:mod pulls in dependencies from many Maven repositories, including ViaVersion, Lenni0451, JitPack, and FabricMC.
Copy the complete repositories block from the template's build.gradle.kts.
A shorter block fails to resolve those dependencies.
Dependencies
The core structure looks like this:
dependencies {
minecraft("com.mojang:minecraft:<minecraft-version>")
implementation("net.fabricmc:fabric-loader:<fabric-loader-version>")
implementation("com.soulfiremc:mod:<soulfire-version>")
compileOnly("org.projectlombok:lombok:<lombok-version>")
annotationProcessor("org.projectlombok:lombok:<lombok-version>")
}Take the Minecraft and Fabric Loader versions from the SoulFire release you target, not from an older template.
Loom configuration
The example plugin uses this pattern:
loom {
accessWidenerPath = file("src/main/resources/my-plugin.accesswidener")
runs {
removeIf { true }
}
}accessWidenerPath points to your optional access widener.
The template removes Loom run configurations because a plugin cannot start on its own.
Test the plugin in a real SoulFire server.
File layout
| File | Purpose |
|---|---|
settings.gradle.kts | Gradle project identity |
build.gradle.kts | Loom, repositories, dependencies, and build logic |
gradle/libs.versions.toml | central place for Minecraft, Fabric Loader, and SoulFire versions |
src/main/resources/fabric.mod.json | Fabric mod metadata and entrypoint registration |
src/main/resources/<plugin-id>.mixins.json | Mixin configuration |
src/main/resources/<plugin-id>.accesswidener | optional access widener |
src/main/java/.../Main.java | ModInitializer entrypoint |
src/main/java/.../MyPlugin.java | your ExternalPlugin implementation |
fabric.mod.json
At minimum, your metadata file needs:
- a unique
id - a
mainentrypoint - a SoulFire dependency entry under
depends - your mixin config name if you use Mixins
- your access widener name if you use one
The official example uses this dependency block:
"depends": {
"fabricloader": "*",
"minecraft": "*",
"soulfire": "*"
}Build output and installation
Build the jar with:
./gradlew buildCopy the JAR from build/libs/ into SoulFire's minecraft/mods directory and restart SoulFire.
Fabric loads the JAR, so it must be a valid Fabric mod. Otherwise SoulFire never reaches your ExternalPlugin.
Keep the template's Gradle wrapper, Loom setup, version catalog, and resource file names until your plugin loads. Simplify the build after that.
Next steps
Последнее обновление:
Полезна ли эта страница?
