Fix DefaultFMLPlatform can't be loaded when other FML platform being used. (#132)

This commit is contained in:
ZekerZhayard authored and GitHub committed 2020-12-20 01:02:07 +08:00
1 parent 581a2dddea
commit 855131d1aa
5 files changed
+51 -32

No files matched your search

@@ -54,8 +54,8 @@ public class LaunchWrapper implements IClassTransformer {
cn = transformerManager.transform(cn, className);
ArrayList<MethodNode> methods = new ArrayList<>();
for (MethodNode mn : cn.methods) {
String mappedMethodName = IFMLPlatform.FMLPlatformInitializer.platform.getRemapper().mapMethodName(cn.name, mn.name, mn.desc);
String mappedMethodDesc = IFMLPlatform.FMLPlatformInitializer.platform.getRemapper().mapMethodDesc(mn.desc);
String mappedMethodName = IFMLPlatform.FMLPlatformInitializer.getPlatform().getRemapper().mapMethodName(cn.name, mn.name, mn.desc);
String mappedMethodDesc = IFMLPlatform.FMLPlatformInitializer.getPlatform().getRemapper().mapMethodDesc(mn.desc);
methods.add(transformerManager.transform(cn, mn, className, mappedMethodName, mappedMethodDesc));
}
cn.methods.clear();