Hello, I’m trying to setup mixins for my Forge mod, but I’m currently having trouble with it.
I’ve followed the instructions on the wiki at Plugin Mixins — Sponge 5.1.0 documentation
but I’ve followed through it and this error is shown when I run “gradlew clean build” on my Forge workspace:
FAILURE: Build failed with an exception.
- Where:
Build file ‘C:\forge-1.8.9-11.15.1.2318-1.8.9-mdk\build.gradle’ line: 22
(error line: apply plugin: ‘org.spongepowered.mixin’)
- What went wrong:
A problem occurred evaluating root project ‘forge-1.8.9-11.15.1.2318-1.8.9-mdk’.
Failed to apply plugin [id ‘org.spongepowered.mixin’]
Could not find task ‘genSrgs’ on root project ‘forge-1.8.9-11.15.1.2318-1.8.9-mdk’, ensure ForgeGradle is applied.
Any solutions to this problem?
On another note, how do I add the mixin library so Eclipse doesn’t show a bunch of errors?
I’ve tried compiling the mixin jar at the repo for it in Github, but the version is a dev version (0.7), and the version in the wiki is 0.6.6.
EDIT 2: I ran into another error. See below.
EDIT: I managed to fix the error entirely. I followed the guide in Cookbook/build.gradle at master · SpongePowered/Cookbook · GitHub
and after using the correct version of mixin, all the errors have been resolved.
Okay, I ran into another error now. The mod can now be fully built, but it doesn’t work anymore. The only way to “fix” it is to remove the TweakClass in META-INF, which disables the mod.
Anyway to fix this?
The logs don’t show any errors either. The mixin does work:
[main/INFO]: SpongePowered MIXIN Subsystem Version=0.7-dev Source=file:/C://mods/mod-1.0.jar Env=CLIENT
However, right after this, Forge only identifies 3 mods to load:
Found 0 mods from the command line. Injecting into mod discoverer
[Client thread/INFO]: Searching C:<mcdir>\mods for mods
[Client thread/INFO]: Forge Mod Loader has identified 3 mods to load
[Client thread/INFO]: Attempting connection with missing mods [mcp, FML, Forge] at CLIENT
[Client thread/INFO]: Attempting connection with missing mods [mcp, FML, Forge] at SERVER