A coremod should not be a ModContainer
simon816 opened this issue ยท 7 comments
There is currently an incompatibility with this mod and SpongeForge (SpongePowered/SpongeForge#496).
Your BowInfinityFix
class is both a coremod and a modcontainer
This causes a problem because DummyModContainer
is force-loaded when the coremod is first initialized, but this does not give Sponge's mixin system a chance to load
You should remove DummyModContainer
from the coremod and load the actual mod in the normal mod cycle.
People use this mod? I'm surprised...
Ok, so I'm really confused...how am I "force-loading" the class, and how does mixin not catch that? Don't IClassTransformers get called upon class loading, so this shouldn't be an issue? And why are you ASMing FML classes?
The DummyModContainer
is being force-loaded too soon because it gets loaded when your coremod is constructed. The problem is that this is so early on that the mixin tweaker hasn't even initialized yet therefore can't transform the class.
We are mixing-in to implementations of ModContainer
so that every mod implements SpongeAPI's PluginContainer
, see MixinModContainer
Well, that answers all of my questions! I can't be the only one to do this, so there's probably a ton more mods that do it. I guess this makes sense as to why they were separate in FML in the first place. Will fix soon.
Thanks!
We've had the same problem with OpenComputers (SpongePowered/SpongeForge#362).
Though, this is only the second time (afaik) that this has happened and spongeforge has been tested with quite a few mods (albeit most mods aren't coremods).
It would be great if mixin could be the absolute first tweaker to load but I don't think that's possible, we will just have to report issues like this to any mods that have the same problem.
Might be worth talking to cpw about it, though I can see how something like that could be easily abused.
Should be fixed if I understood the problem correctly. rv2 should be on CurseForge soon.