RandomPatches icon indicating copy to clipboard operation
RandomPatches copied to clipboard

Mixin config loads MC classes too early, causing other Mixins to fail

Open malte0811 opened this issue 4 years ago • 1 comments

https://github.com/TheRandomLabs/RandomPatches/blob/a2a9f19caab38f3f4078bf5acadcca7e300d4788/src/main/java/com/therandomlabs/randompatches/mixin/RPMixinConfig.java#L59-L62

That causes the main mod class and various other classes (including Identifier/ResourceLocation via autoconfig and the fabric Event class) to be loaded before all Mixin configs are loaded. In my case this causes https://github.com/malte0811/FerriteCore/issues/43#issuecomment-986451570 since my accessors to ResourceLocation are not applied. In general only classes from "basic" libraries and classes in your own mod that only load such classes should be referenced directly in a Mixin config.

malte0811 avatar Dec 07 '21 08:12 malte0811

This also breaks Rhino: https://www.curseforge.com/minecraft/mc-mods/rhino with the same issue

spoorn avatar Jan 15 '22 11:01 spoorn