mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 15:57:42 +00:00
Clear the LaunchClassLoader miss cache because the library containing it might be loaded later
This commit is contained in:
1 parent
bb29d3f80c
commit
3307b52f09
2 files changed
+6
-5
No files matched your search
@@ -203,14 +203,15 @@ public class MCPDeobfuscationTransformer implements IClassTransformer, Opcodes,
|
||||
|
||||
@Override
|
||||
public List<String> getParents(ObfuscationEntry desc) {
|
||||
String name = ObfMapping.obfuscated ? desc.obf.s_owner : desc.mcp.s_owner;
|
||||
name = name.replace('/', '.');
|
||||
try {
|
||||
String name = ObfMapping.obfuscated ? desc.obf.s_owner : desc.mcp.s_owner;
|
||||
name = name.replace('/', '.');
|
||||
byte[] bytes = Launch.classLoader.getClassBytes(name);
|
||||
if (bytes != null)
|
||||
return ObfuscationRun.getParents(ASMHelper.createClassNode(bytes));
|
||||
} catch (IOException e) {
|
||||
}
|
||||
} catch (IOException ignored) {}
|
||||
//clear the miss cache because the library containing it might be loaded later
|
||||
Launch.classLoader.clearNegativeEntries(Collections.singleton(name));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface IHeirachyEvaluator
|
||||
public List<String> getParents(ObfuscationEntry desc);
|
||||
|
||||
/**
|
||||
* @param srg_class The srg name of the class in question
|
||||
* @param desc The mapping descriptor of the class in question
|
||||
* @return True if this class does not inherit from any obfuscated class.
|
||||
*/
|
||||
public boolean isLibClass(ObfuscationEntry desc);
|
||||
|
||||
Reference in new issue
Block a user