CleanroomMC / MixinBooter

Allows any mixins that work on mods to work effortlessly. With a single class and an annotation. On 1.12.2.
GNU Lesser General Public License v2.1
53 stars 17 forks source link

Mixin doesn't work on client-side with release jar #18

Closed Pival81 closed 1 year ago

Pival81 commented 2 years ago

I made this small mod that adds compatibility between Botania's Horn of the Wild and Reliquary's Lilypad of Fertility, basically if you use the horn (or the drum of the wild which does the same thing) near the lilypad, the lilypad will break and I didn't like that. I only needed reliquary's block to implement botania's interface. I also made the itemblock for the lilypad shimmer by overwriting the hasEffect method to return true, just to mess around. At first everything worked in my dev environment, then nothing worked in release and after a bit of searching I understood I needed mixinbooter, so I implemented it and it works, the lilypad doesn't break when I use the horn. But for some reason the other mixin isn't working, the itemblock won't shimmer. Everything does still work in dev.

I even tried to add mixin's debug arguments to my multimc instance, but all it showed was that the mixin loaded fine.

Sorry for the wall of text btw, I've been trying to fix this for the last few days and didn't want to leave anything out. Here's my mod's repo: https://github.com/Pival81/BotaniaReliquaryCompat

Pival81 commented 2 years ago

Just now I tried to add another method to the itemblock mixin, just to see if the whole mixin was not working or only part of it. I injected on the onItemRightClick method and made it display a test string on screen. This works in both dev and release, so we can be sure that the mixin is being loaded and is partly working, it's just not working on the client.

KorewaLidesu commented 1 year ago

Can you uncomment this and try again?

Rongmario commented 1 year ago

I'd advise to not use ForgeGradle 3, if you must then follow the build.gradle over here, feel free to check the master branch for ForgeGradle 2.3 (most stable imo).

Pival81 commented 1 year ago

Can you uncomment this and try again?

Client still crashes, and it still loads fine from dev running the runClient task. Log here.

follow the build.gradle over here

I'll try that out tomorrow, thanks. If that doesn't work either, I'll switch to FG 2.3 and see if that helps.

Pival81 commented 1 year ago

Ok this is weird. I made my mixin extend the Item class, and had my method override the one from the class I just extended, and now it works in both release and dev environments.

This leads me to think that it's the mixin library itself that's behaving differently, is it perhaps a different version than the one I'm loading from gradle? Or maybe it's configured differently?

Pival81 commented 1 year ago

I guess this can be closed since it was up to me, even though I don't really know why it works differently between my dev environment and the Mixin library provided by MixinBooter.

Rongmario commented 1 year ago

No problem, glad its fixed.