fabric-loader icon indicating copy to clipboard operation
fabric-loader copied to clipboard

[Feature Request] An entrypoint loaded before any mixin is applied

Open thecatcore opened this issue 3 years ago • 6 comments

thecatcore avatar Dec 29 '21 22:12 thecatcore

Does PreLaunch do what your after? https://github.com/FabricMC/fabric-loader/blob/master/src/main/java/net/fabricmc/loader/api/entrypoint/PreLaunchEntrypoint.java#L20

modmuss50 avatar Dec 29 '21 22:12 modmuss50

Ugh I was thinking of an entrypoint invoked here: https://github.com/FabricMC/fabric-loader/blob/master/src/main/java/net/fabricmc/loader/impl/launch/knot/Knot.java#L144

thecatcore avatar Dec 29 '21 22:12 thecatcore

Whats your usecase?

modmuss50 avatar Dec 29 '21 22:12 modmuss50

Hm, recently in Legacy Fabric, we had to regenerate intermediary to fix a major issue, the issue is fixed now, but every mod built with the previous intermediary will crash the game. I'm try to prevent this by at least detecting if the mod folder contains such mod, however I'm facing the case of an "old" mixin being initialized at the same time preLaunch is invoked, preventing any code from my mod to load at all.

thecatcore avatar Dec 29 '21 22:12 thecatcore

oh, it's seems to be somewhat duplicate of #486

thecatcore avatar Dec 29 '21 22:12 thecatcore

Anything earlier than preLaunch is loader plugin territory, which will come eventually. For now you may be able to exploit a mixin plugin, although we don't officially support those.

Player3324 avatar Dec 30 '21 01:12 Player3324

Try using IMixinConfigPlugin.<clinit>

burningtnt avatar Oct 22 '23 04:10 burningtnt