mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-22 15:29:45 +00:00
Run transformers even if bytecode not loaded, fixes synthetic classes
This commit is contained in:
1 parent
967d9e28e7
commit
61ec3187b8
1 file changed
+5
-5
@@ -86,16 +86,16 @@ abstract class TreeInfo {
|
||||
protected static byte[] loadClass(String className, boolean runTransformers) throws ClassNotFoundException, IOException {
|
||||
String transformedName = className.replace('/', '.');
|
||||
String name = MixinEnvironment.getCurrentEnvironment().unmap(transformedName);
|
||||
byte[] classBytes = null;
|
||||
|
||||
if ((classBytes = TreeInfo.getClassBytes(name, transformedName)) == null) {
|
||||
throw new ClassNotFoundException(String.format("The specified class '%s' was not found", transformedName));
|
||||
}
|
||||
byte[] classBytes = TreeInfo.getClassBytes(name, transformedName);
|
||||
|
||||
if (runTransformers) {
|
||||
classBytes = TreeInfo.applyTransformers(name, transformedName, classBytes);
|
||||
}
|
||||
|
||||
if (classBytes == null) {
|
||||
throw new ClassNotFoundException(String.format("The specified class '%s' was not found", transformedName));
|
||||
}
|
||||
|
||||
return classBytes;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user