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

Mixin inner classes are remapped wrongly in dev env

Open RaphiMC opened this issue 2 years ago • 3 comments

When trying to load my mod from a dev env it crashes because it can't find a field. It seems like loom didn't remap all fields within the mixin accordingly. The mod works fine on normal env. This is the mixin: https://github.com/RaphiMC/ImmediatelyFast/blob/1.19.3/src/main/java/net/raphimc/immediatelyfast/injection/mixins/fast_text_lookup/MixinFontManager.java

This is the error: java.lang.NoSuchFieldError: field_18215 at net.minecraft.client.font.FontManager$Anonymous$6f2c7eaf04df493abc6eaa0a18900e95.<init>(MixinFontManager.java:71) at net.minecraft.client.font.FontManager.handler$bbe000$if$hookReloader(FontManager.java:570) at net.minecraft.client.font.FontManager.<init>(FontManager.java:153) at net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:574) at net.minecraft.client.main.Main.main(Main.java:186) at net.minecraft.client.main.Main.main(Main.java:52) at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461) at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

RaphiMC avatar Jan 19 '23 19:01 RaphiMC

When trying to load my mod from a dev env

Do you mean when building from source, or when depending on it in another mod, or possibly when placed into the /mods folder?

What loader version are you using? As we fairly recently fixed a few bugs related to the mixin remapping in newer loader versions.

modmuss50 avatar Jan 19 '23 21:01 modmuss50

Building that mod from source works fine (And it runs in normal env fine as well) I am depending on the mod in another mod and thats when it breaks when I start the game. It also breaks if I put the mod inside the /mods folder in a dev env I am using Fabric Loader 0.14.13 on MC 1.19.3 in the dev env I am trying to load the mod.

RaphiMC avatar Jan 19 '23 21:01 RaphiMC

Fixed by FabricMC/Mixin#98

0-x-2-2 avatar Jan 31 '23 12:01 0-x-2-2