mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-12 08:27:39 +00:00
fix obfuscation error from last commit D: (#648)
This commit is contained in:
1 parent
60cce7ea1d
commit
ab243bb936
2 files changed
+5
-1
No files matched your search
@@ -31,6 +31,10 @@ public class BlockTransformer implements IClassTransformer {
|
||||
return AngelicaTweaker.isObfEnv() ? srgMapping : mcpMapping;
|
||||
}
|
||||
|
||||
public static String getClearFieldName(String name) {
|
||||
return AngelicaTweaker.isObfEnv() ? mcpMapping.get(srgMapping.indexOf(name)) : name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the global vanilla bounding box fields off the Block object. {@link RedirectorTransformer}
|
||||
* replaces these with a thread-safe alternative.
|
||||
|
||||
@@ -387,7 +387,7 @@ public class RedirectorTransformer implements IClassTransformer {
|
||||
AngelicaTweaker.LOGGER.info("Redirecting Block.{} in {} to thread-safe wrapper", fNode.name, transformedName);
|
||||
}
|
||||
// Perform the redirect
|
||||
fNode.name = fieldToRedirect;
|
||||
fNode.name = BlockTransformer.getClearFieldName(fieldToRedirect);
|
||||
fNode.owner = ThreadedBlockData;
|
||||
// Inject getter before the field access, to turn Block -> ThreadedBlockData
|
||||
final MethodInsnNode getter = new MethodInsnNode(Opcodes.INVOKESTATIC, ThreadedBlockData, "get", "(L" + BlockClass + ";)L" + ThreadedBlockData + ";", false);
|
||||
|
||||
Reference in new issue
Block a user