@@ -18,22 +18,17 @@ public class ASMTransformer implements IClassTransformer {
18
18
@ Override
19
19
public byte [] transform (String name , String transformedName , byte [] bytes ) {
20
20
switch (name ) {
21
- case "bbu " :
21
+ case "bip " :
22
22
case "net.minecraft.client.gui.FontRenderer" :
23
23
return patchFontRenderer (bytes );
24
- case "brs " :
24
+ case "cfb " :
25
25
return patchLocale (bytes , true );
26
26
case "net.minecraft.client.resources.Locale" :
27
27
return patchLocale (bytes , false );
28
28
case "net.minecraft.client.Minecraft" :
29
29
return patchMinecraft (bytes , false );
30
- case "bao " :
30
+ case "bib " :
31
31
return patchMinecraft (bytes , true );
32
- case "cofh.core.ProxyClient" :
33
- case "cofh.lib.render.RenderHelper" :
34
- case "buildcraft.silicon.render.PackageFontRenderer" :
35
- case "blusunrize.immersiveengineering.client.IEManualInstance" :
36
- return patchMods (bytes );
37
32
}
38
33
return bytes ;
39
34
}
@@ -64,12 +59,12 @@ private byte[] patchFontRenderer(byte[] bytes) {
64
59
private byte [] patchLocale (byte [] bytes , boolean obf ) {
65
60
ClassNode clazz = Utils .readClass (bytes );
66
61
67
- final Type classMc = Utils .getObjectType (obf ? "bao " : "net.minecraft.client.Minecraft" );
68
- final Type classSettings = Utils .getObjectType (obf ? "bbj " : "net.minecraft.client.settings.GameSettings" );
69
- final Type classLocale = Utils .getObjectType (obf ? "brs " : "net.minecraft.client.resources.Locale" );
62
+ final Type classMc = Utils .getObjectType (obf ? "bib " : "net.minecraft.client.Minecraft" );
63
+ final Type classSettings = Utils .getObjectType (obf ? "bid " : "net.minecraft.client.settings.GameSettings" );
64
+ final Type classLocale = Utils .getObjectType (obf ? "cfb " : "net.minecraft.client.resources.Locale" );
70
65
final String findMethod = obf ? "a" : "isUnicode" ;
71
- final String getMinecraft = obf ? "B " : "getMinecraft" ;
72
- final String gameSettings = obf ? "u " : "gameSettings" ;
66
+ final String getMinecraft = obf ? "z " : "getMinecraft" ;
67
+ final String gameSettings = obf ? "t " : "gameSettings" ;
73
68
74
69
for (MethodNode method : clazz .methods ) {
75
70
if (method .name .equals (findMethod ) && method .desc .equals (Type .getMethodDescriptor (Type .BOOLEAN_TYPE ))) {
@@ -79,16 +74,16 @@ private byte[] patchLocale(byte[] bytes, boolean obf) {
79
74
list .add (new VarInsnNode (ASTORE , 1 ));
80
75
list .add (new VarInsnNode (ALOAD , 1 ));
81
76
list .add (new FieldInsnNode (GETFIELD , classMc .getInternalName (), gameSettings , classSettings .getDescriptor ()));
82
- list .add (new FieldInsnNode (GETFIELD , classSettings .getInternalName (), obf ? "aK " : "language" , Type .getType (String .class ).getDescriptor ()));
77
+ list .add (new FieldInsnNode (GETFIELD , classSettings .getInternalName (), obf ? "aJ " : "language" , Type .getType (String .class ).getDescriptor ()));
83
78
list .add (new LdcInsnNode ("ru_RU" ));
84
79
list .add (new MethodInsnNode (INVOKEVIRTUAL , Type .getInternalName (String .class ), "equals" , Type .getMethodDescriptor (Type .BOOLEAN_TYPE , Type .getType (Object .class )), false ));
85
80
list .add (new MethodInsnNode (INVOKESTATIC , classMc .getInternalName (), getMinecraft , Type .getMethodDescriptor (classMc ), false ));
86
81
list .add (new FieldInsnNode (GETFIELD , classMc .getInternalName (), gameSettings , classSettings .getDescriptor ()));
87
- list .add (new FieldInsnNode (GETFIELD , classSettings .getInternalName (), obf ? "aL " : "forceUnicodeFont" , Type .BOOLEAN_TYPE .getDescriptor ()));
82
+ list .add (new FieldInsnNode (GETFIELD , classSettings .getInternalName (), obf ? "aK " : "forceUnicodeFont" , Type .BOOLEAN_TYPE .getDescriptor ()));
88
83
list .add (new InsnNode (IRETURN ));
89
84
list .add (new FrameNode (F_APPEND , 1 , new Object []{classMc .getInternalName ()}, 0 , null ));
90
85
list .add (new VarInsnNode (ALOAD , 0 ));
91
- list .add (new FieldInsnNode (GETFIELD , classLocale .getInternalName (), obf ? "d" : "field_135029_d " , Type .BOOLEAN_TYPE .getDescriptor ()));
86
+ list .add (new FieldInsnNode (GETFIELD , classLocale .getInternalName (), obf ? "d" : "unicode " , Type .BOOLEAN_TYPE .getDescriptor ()));
92
87
list .add (new InsnNode (IRETURN ));
93
88
94
89
method .instructions = list ;
@@ -102,8 +97,8 @@ private byte[] patchLocale(byte[] bytes, boolean obf) {
102
97
103
98
private byte [] patchMinecraft (byte [] bytes , boolean obf ) {
104
99
ClassNode clazz = Utils .readClass (bytes );
105
- final Type fondRenderer = Utils .getObjectType (obf ? "bbu " : "net.minecraft.client.gui.FontRenderer" );
106
- final String mStartGame = obf ? "ag " : "startGame " ;
100
+ final Type fondRenderer = Utils .getObjectType (obf ? "bip " : "net.minecraft.client.gui.FontRenderer" );
101
+ final String mStartGame = obf ? "aq " : "init " ;
107
102
108
103
for (MethodNode method : clazz .methods ) {
109
104
if (method .name .equals (mStartGame ) && method .desc .equals (Type .getMethodDescriptor (Type .VOID_TYPE ))) {
0 commit comments