Skip to content

Sponge and Issue Reports

Sam Kirby edited this page Oct 22, 2019 · 1 revision

Or why issues only present with Sponge installed are not investigated

Sponge is a plugin system for Minecraft servers.

Sponge, like Forge, changes many of the base Minecraft classes, making changes to everything from storage to networking to world gen to advancements, and for many different reasons.

A couple of examples that break mods:-

  1. Minecraft is multithreaded (slightly). Two threads do almost everything, one handles the world and everything in it whilst the other handles networking. The world and objects in it are not "thread safe", meaning that they do not expect to be modified by anything but the thread that they belong to (the world or main thread). In vanilla minecraft, and under Forge, there is no enforcement of this and poorly written mods frequently use the network thread to change the world and associated objects. This shouldn't be done, and sometimes causes data corruption. Sponge however blocks access to the world objects from the network thread, crashing the game deliberately if it detects it. This is a good thing in my view, but the check has a performance penalty, as well as having a chance of causing corruption itself, and in an ideal world would be confined to a dev environment.

  2. JEID modifies storage and world generation to allow all the ID limits in vanilla Minecraft 1.12 to be exceeded. It makes changes to a number of classes that Sponge modifies, and changes made by Sponge frequently conflict with JEID.

In the first example, sponge exposes a bad practice on the side of the mod. This can only be fixed by the mod developer and reporting it to us is unnecessary as we cannot do anything.

In the second example, the mod is perfectly fine in a Forge environment and neither Sponge nor the mod is inherently doing anything wrong. Mod developers in this position are free to decide whether or not they do the extra work to support Sponge. This may not be reasonable in all cases. In any case, this is a decision for the mod developer or the SpongePowered team and not for us to consider.

Sponge compatibility can be difficult due to the fact that Spongeforge's developers are constantly trying to make sure that their mod is in complete control of many aspects of the game so Sponge plugins run predictably on Vanilla and modded servers, only delegating to Forge where they have to to make its core functions work. This sometimes leaves Forge mods as second class citizens.

Additionally, Sponge's litany of changes are much harder to develop against for mod developers. As far as I'm aware, there is no easy way to setup a development environment where you can inspect the Minecraft classes with Sponge's changes applied. You can do this easily with Forge's development environment. Their use of mixins can also make program flow difficult to follow for those unfamiliar with them. This is a particular problem for developers of mods that require coremods.