Struggling to set up environment for SpongeForge Development

I’m having some trouble trying to get my IntelliJ environment set up for SpongeForge development. I have been following this video here to try and set it up, however I’ve noticed that even when I select both “Sponge Plugin” and “Forge Mod” as he does in the video, it does not present me a combined “SpongeForge” page like it does for him, but instead the Sponge and Forge pages separately.
Where this is causing confusion, is when the project finally builds, I find myself with 3 very similar directories under the project (which I have named “TestPlugin”):

  • TestPlugin-common
  • TestPlugin-forge
  • TestPlugin-sponge
    Each has a respective “src” directory, which contains the expected directories, however TestPlugin-forge also contains a “build” directory and TestPlugin-common is missing its respective file that the other two contain under src > main > java > com > gazoney > testplugin

Which directory would I want to operate under for the development of a Pixelmon plugin? Or have I done something incorrectly which is preventing an expected behavior of SpongeForge operating as a single entity?

So it sounds like you click the option for a Single project with Sponge and Forge modules, not a Single project with both Sponge and Forge APIs.

You can either setup the whole project again, or you can setup the project manually by following documentation on spongedocs (which is more up to date then the video (video is 3 years old, documentation is kept up to date))

Ah, that’s actually something I forgot to mention as well
It doesn’t give me that option after selecting Sponge + Forge, it just goes straight into the Build Settings window.

Do you happen to have a link to that document? Can’t seem to find one specifically for setting up an environment with both Sponge and Forge

Ah so reading into it a little more, they removed the Sponge+Forge combined.

So the easiest way I would say is to build a ForgeMod using the Intelij plugin, then manually add the Sponge dependencies into the file. After that add your main class as a Sponge launch class and should be good to go from there.

Here are the docs I was talking about:

Setting up in Intelij: Setting Up IntelliJ IDEA — Sponge 7.3.0 documentation

Setting up gradle:

Hope that helps

Awesome, appreciate the help, thanks!

1 Like

This rocks, thank you. MoseMister

1 Like