Fix AllPublic access transformer not affecting methods. Should fix modloader

compatibility
This commit is contained in:
Christian 2013-03-14 14:00:27 -04:00
parent d98a805b30
commit 06347b2a54

View file

@ -161,6 +161,10 @@ public class AccessTransformer implements IClassTransformer
if (bytes == null) { return null; }
boolean makeAllPublic = FMLDeobfuscatingRemapper.INSTANCE.isRemappedClass(name);
if (DEBUG)
{
System.out.printf("Considering all methods and fields on %s (%s): %b\n", name, transformedName, makeAllPublic);
}
if (!makeAllPublic && !modifiers.containsKey(name)) { return bytes; }
ClassNode classNode = new ClassNode();
@ -183,8 +187,12 @@ public class AccessTransformer implements IClassTransformer
m = new Modifier();
m.targetAccess = ACC_PUBLIC;
m.name = "*";
m.desc = "";
m.desc = "<dummy>";
modifiers.put(name,m);
if (DEBUG)
{
System.out.printf("Injected all public modifiers for %s (%s)\n", name, transformedName);
}
}
Collection<Modifier> mods = modifiers.get(name);