Question about forge mods and sponge api

Hello, I am new here and I would like to know if sponge let’s the user use any forge mod for any version.
The way I heard sponge works is that it sheilds mods from minecraft updating and the changes it would create by creating an “interface” (a fake Version of minecraft for the mod to use. (e.x. I could install the primitive mobs mod on 1.10 (primitive mobs only goes to 1.7.10), and would still properly function by using the fake version as a sort of translator between the older mod and the newer minecraft version)
Is sponge api able to work like that or do I have it wrong? Can someone tell me please?

2 Likes

Forge mods: no, Forge mods do not (by definition) use the Sponge API and so must be updated with each Minecraft version as has always been the case.

SpongeAPI plugins: it depends. Between minor releases (such as 4.0.0 to 4.1.0) plugins will definitely be compatible. However, between major versions (such as 4.1.0 to 5.0.0) plugins may need to be updated to ensure compatibility.

It is the hope that in the future, some Forge mods may be able to be converted to Sponge mods and therefore be version cross-compatible. But there is a long way to go until many required features (such as modifying base minecraft entities) are in Sponge for this to be possible.

2 Likes

An interface is a different concept; what you’re referring to is an abstraction. And yes, this is how the Sponge API works. Sponge plugins deal with an abstraction, rather than with Minecraft itself; this allows for the easiest programming (and most well-designed). However, mods do not use Sponge, they use Forge. Forge is much less of an abstraction, and mostly deals with getting the code run.
As a side note, any time you see a major version change (e.g. 4.1.0 to 5.0.0), it means there are breaking changes. Plugins developed for one major version will likely not work on another major version. However, plugins made on a minor version are guaranteed to work with all subsequent minor versions (although not previous ones). This is perpendicular to Bukkit’s system, whereby almost nothing was ever broken between versions.