I just add Sponge on my classpath and build the artifact out of it in Intellij since I tried countless of times trying to use gradle and maven, it always shows this error:
com.google.inject.internal.MessageProcessor visit
INFO: An exception was caught and reported. Message: java.lang.ClassCastException: net.minecraftforge.fml.common.MinecraftDummyContainer cannot be cast to org.spongepowered.api.plugin.PluginContainer
java.lang.ClassCastException: net.minecraftforge.fml.common.MinecraftDummyContainer cannot be cast to org.spongepowered.api.plugin.PluginContainer
So yeah, now I am wondering how you guys set your environment up for plugin development.
I got this exact problem, when following the tutorial posted. My solution is posted to the official doc. Rather than adding Sponge to Plugin classpath, add the Plugin to the Sponge classpath.
This comes with the added benefit of being able to test more than a single plugin at a time.
I am really glad someone else had the same problem and figured out now and thanks a lot for that doc. I will be sure to have a nice read because the testing is pretty time-consuming the way I am doing right now.
I use Eclipse and just adding the latest Sponge build from here to the build path.
I never used gradle before and dont really want to mess around with that.
The only reason I add Sponge on the buildpath and use it as a library on my plugin is because I cannot get the way it’s setup on the doc because it’s incomplete. It doesn’t show how to clone the gradle and other things.