With Forge having native support for “core-mods”, we found it fitting to allow plugins to provide mixins when using SpongeVanilla. Now, it is possible! Plugins that provide mixins through normal means can have their mixins loaded by SpongeVanilla.
What does this mean really? It means that if a server administrator focuses solely on SpongeVanilla for vanilla features (no intentions of using forge or content adding mods), it’s possible now to provide as many modifications to the game as deemed fit. I’m sure the docs will be written up soon on how to take advantage of this system, or perhaps @minecrell might document it.
Would it be technically possible to support the exact same way to use mixins as in SpongeVanilla in SpongeForge? Now, a plugin would depend on SpongeVanilla and wouldn’t be compatible with SpongeForge. So is this feature rather for custom internal use on large servers?
Much the same applies for Mixins targetting SV and SF as does for SpongeCommon and SpongeVanilla and SpongeForge project mixins.
Basically, as long as your mixin targets code which is the same in both codebases, there’s no changes required. However if code is different between forge and vanilla then you just need to either:
Provide two mixins (one for each environment), supply a companion plugin with your mixin set to select the right one based on the environment, or.
Make your mixin adaptable, for example using injections with a defined injector group or surrogates for failover.
Okay. I mean, could Sponge Forge load this “new type” of plugin like Sponge Vanilla now can? As I understand it, it would be only possible using a core mod to achieve the same behavior as in Sponge Vanilla.
You missed the most important point. With FML you must include the FMLCorePluginContainsFMLMod directive as well, otherwise your mod jar will never be submitted for mod candidacy after the tweaker is consumed.
As long as you have your Gradle script set up to use NMS, just run gradle setupDecompWorkspace, then update your IDE project and the sources should be attached.
I have been trying to get this working on 1.10.2 but nope :
Error:Could not GET 'https://libraries.minecraft.net/net/minecraft/minecraft_serverBin/1.10.2/minecraft_serverBin-1.10.2.pom'. Received status code 403 from server: Forbidden
Note that in many cases (e.g. when you use @Shadow or call net.minecraft classes), simply using the jar task won’t work. You should instead use the build task (which uses reobfJar). Otherwise, your mixins will break when you try to use them on the obfuscated server.