mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-25 14:44:28 +00:00
Deal with obfuscation properly (#645)
* make one method to dump the classes instead of copy pasting 6 times * deal with obfuscation properly in ASM transformers instead of brute forcing both obfuscated and clear names * remove sorting index on AngelicaTweaker to avoid confusion * use static final variables for the class names with "."
This commit is contained in:
1 parent
b837b0571d
commit
60cce7ea1d
7 files changed
+84
-79
No files matched your search
@@ -2,7 +2,6 @@ package jss.notfine.asm;
|
||||
|
||||
import static jss.notfine.asm.ASMUtils.matchesNodeSequence;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.asm.ASMUtil;
|
||||
import com.gtnewhorizons.angelica.loading.AngelicaTweaker;
|
||||
import net.minecraft.launchwrapper.IClassTransformer;
|
||||
|
||||
@@ -35,10 +34,7 @@ public class RenderBlocksTransformer implements IClassTransformer {
|
||||
public byte[] transform(String name, String transformedName, byte[] basicClass) {
|
||||
if ("net.minecraft.client.renderer.RenderBlocks".equals(transformedName)) {
|
||||
final byte[] bytes = patchRenderBlocks(basicClass);
|
||||
if (AngelicaTweaker.DUMP_CLASSES()) {
|
||||
ASMUtil.saveAsRawClassFile(basicClass, transformedName + "_PRE", this);
|
||||
ASMUtil.saveAsRawClassFile(bytes, transformedName + "_POST", this);
|
||||
}
|
||||
AngelicaTweaker.dumpClass(transformedName, basicClass, bytes, this);
|
||||
return bytes;
|
||||
}
|
||||
return basicClass;
|
||||
|
||||
Reference in new issue
Block a user