Legacy FML agent has this code
|
private void injectRemapper() { |
|
try { |
|
MixinPlatformAgentAbstract.logger.debug("Creating FML remapper adapter: {}", MixinPlatformAgentFMLLegacy.FML_REMAPPER_ADAPTER_CLASS); |
|
Class<?> clFmlRemapperAdapter = Class.forName(MixinPlatformAgentFMLLegacy.FML_REMAPPER_ADAPTER_CLASS, true, Launch.classLoader); |
|
Method mdCreate = clFmlRemapperAdapter.getDeclaredMethod("create"); |
|
IRemapper remapper = (IRemapper)mdCreate.invoke(null); |
|
MixinEnvironment.getDefaultEnvironment().getRemappers().add(remapper); |
|
} catch (Exception ex) { |
|
MixinPlatformAgentAbstract.logger.debug("Failed instancing FML remapper adapter, things will probably go horribly for notch-obf'd mods!"); |
|
} |
|
} |
and this allows remapping refmap to work. Modlauncher specific agent doesn't have an equivalent.
While this wouldn't allow mods using mixin to work in dev just by putting them into mods folder (because that's not supported at all), this should allow dependencies added with fg.deobf to work (since the dependency remaping uses this code https://github.com/MinecraftForge/InstallerTools/blob/9147fcae6e088daf02d31a01ce6724ce91361ffa/src/main/java/net/minecraftforge/installertools/SrgMcpRenamer.java#L99-L112 which would remap shadows and overwrites correctly).
Legacy FML agent has this code
Mixin/src/launchwrapper/java/org/spongepowered/asm/launch/platform/MixinPlatformAgentFMLLegacy.java
Lines 314 to 324 in 4585277
and this allows remapping refmap to work. Modlauncher specific agent doesn't have an equivalent.
While this wouldn't allow mods using mixin to work in dev just by putting them into mods folder (because that's not supported at all), this should allow dependencies added with
fg.deobfto work (since the dependency remaping uses this code https://github.com/MinecraftForge/InstallerTools/blob/9147fcae6e088daf02d31a01ce6724ce91361ffa/src/main/java/net/minecraftforge/installertools/SrgMcpRenamer.java#L99-L112 which would remap shadows and overwrites correctly).