I know that it’s possible in Forge to specify a mod classname within the classpath, but I can’t seem to remember / find how to do it. How would I do it? I need to in order to test a plugin I’m developing.
Forge automatically searches the entire classpath. Just set up your build.gradle
as usual for a Forge mod, then add compile 'org.spongepowered:spongeapi:VERSION'
and deobfProvided 'org.spongepowered:spongeforge:VERSION'
to your dependencies
and the Sponge and Forge Maven repositories to your repositories
.
I’ve just finished doing that and when I run the client or the server, Forge does not detect Sponge, despite it detecting my other dependencies.
dependencies {
compile "org.spongepowered:spongeapi:4.1.0" // This is not loaded in by FML
compile fileTree(dir: "libs", include: "**.jar") // These mods get loaded in
}
It doesn’t load SpongeApi as a mod because it isn’t a mod. You need SpongeForge instead.
Thanks. It worked.