LXGaming / Sledgehammer

Smashes the stupid out of the client & server.
Apache License 2.0
16 stars 5 forks source link

[1.12.2] Mixin Ordering Crash #31

Closed TheComputerizer closed 2 years ago

TheComputerizer commented 2 years ago

Sledgehammer mixins will fail to initialize if it is the first coremod to init the mixinbootstrap. It fails with only music triggers, sledgehammer, and mixinbooter installed. Here is the log

LXGaming commented 2 years ago

Will have to double check but from memory initializing Mixin in the static constructor of a CoreMod is just asking for a bad time https://github.com/TheComputerizer/Music-Triggers/blob/e886b24e5c904b5329d0aa7a4a61b692216e51c3/src/main/java/mods/thecomputerizer/musictriggers/core/LoadingPlugin.java#L21

Curious as to why you are not using the TweakClass and MixinConfigs manifest options for loading your Mixins, using a CoreMod shouldn't be necessary if your only Mixing into Minecraft classes https://github.com/LXGaming/Sledgehammer/blob/af9232b94bc5c66cc702b6dba3c7a8a138e09568/build.gradle#L249

TheComputerizer commented 2 years ago

Yeah it looks like switching that from a core mod to the manifest lets it load up properly. I feel like it could still cause issues with other mods that actually do need to do core mod stuff with mixins though so it might be worth keeping in mind.

LXGaming commented 2 years ago

Unfortunately this is an issue that I have had and will continue to have to deal with in Sledgehammer, Mixin needs to be loaded correctly in order for Sledgehammer to inject into classes which are loaded very early.

This is one of the limitation of LaunchWrapper, which can't be fixed, however with ModLauncher in 1.13+ hacky like is no longer needed.