Which Sponge to use?

I am just starting using the Sponge API (I was previously using Bukkit, and I do have prior Java knowledge), and I am curious. If I am only going to be using Sponge to code my plugins along with running a local testing server (I’m not going to even portforward it), which version of Sponge should I use? Coremod, Vanilla, or Cauldron?
Thanks in advance, RoboticPlayer.

Cauldron isnt apart of Sponge. Currently SpongeForge is more mature than SpongeVanilla but from a coding point of view, plugins are compatible with both. I would use SpongeForge for now but thats just my opinion.

First of all, Cauldron is not related to Sponge in an way beyond using Forge/Minecraft and being written by one of Sponge’s core developers.

If you want to use Forge mods, use SpongeForge (the core mod). If you don’t want to use Forge mods, you can use either SpongeForge or SpongeVanilla. However, I’d recommend using SpongeForge until SpongeVanilla is mostly implemented.

1 Like

Ok, the reason that I mentioned Cauldron was due to this: https://docs.spongepowered.org/en/server/getting-started/implementations/index.html
Also, would you recommend that I use Maven or Gradle to build my plugins?

I’d recommend Gradle because using it in combination with ForgeGradle or the Sponge SDK allows you to test plugins in an IDE.

I personally use maven, because I’m too lazy to learn how to gradle. And I can debug my plugins in my IDE (Eclipse) too…

1 Like

@Saladoc How would I go about setting up the environment? I don’t really understand the tutorial, and I’ve never used Maven before (only Java Project).

if you use gradle, first follow this

followed by the Adding Plugin to Sponge classpath section here

https://docs.spongepowered.org/en/plugin/debugging.html

I actually build my sponge plugins though java project. If you have ever built for bukkit-plugins it’s just like that only instead of importing bukkit you import sponge. If you haven’t then look up bukkit java project environment setup and change the bukkit.jar to sponge.jar

I don’t know where you got that idea from but its not true. They both use two different APIs and plugins are consequently not cross compatible.

2 Likes

I think he referred to SpongeForge and SpongeVanilla. Cauldron is obviously not compatible to Sponge as its using another API

1 Like

I was talking about spongeforge and spongevanilla, not cauldron

1 Like

Oh ok. I heard that you couldn’t do Java Project.

I think you misunderstand what Sponge and Bukkit are. They are APIs (and of course they have implementation counterparts) built using the Java programming language. When you use Sponge, you are already programming in Java, you’re simply just using the libraries you’ve downloaded in addition.

This is what the JRE consists of (src):

The Java Runtime Environment (JRE) is what you get when you download Java software. The JRE consists of the Java Virtual Machine (JVM), Java platform core classes, and supporting Java platform libraries. The JRE is the runtime portion of Java software, which is all you need to run it in your Web browser.

all my sponge java projects work (when sponge didnt have the boot issue) so i know it works. Something i forgot to mention was you also need a file guava.jar in your inject librey even though you dont use it on the server. Sponge uses this program to get the

Optional<Object>

object. So happy programming :wink:

That will be changing, see: "There's a Java update available!"

it maybe changing but currently we still need it

I would recommend using a build-tool such as maven or gradle. They would make dependencies much easier.

2 Likes

I am aware that they are APIs. I was under the impression that with Sponge, you had to build using either Maven or Gradle. I was not aware that you were able to build with Sponge simply by adding the .jar as an API like you can with Bukkit.

Technically, you cannot just use one of the API jars, you must use the shaded jar which is available somewhere. But using maven or gradle is better in the long run. It makes it easier for others to contribute.