@@ -23,14 +23,14 @@ public class ASMTransformer implements IClassTransformer {
23
23
private static final String CYRILLIC_TEXTURE = "/font/default_ru.png" ;
24
24
25
25
@ Override
26
- public byte [] transform (String name , byte [] bytes ) {
27
- if (name .equals ("bn " )) {
26
+ public byte [] transform (String name , String transformedName , byte [] bytes ) {
27
+ if (name .equals ("bp " )) {
28
28
return patchStringTranslate (bytes , true );
29
29
} else if (name .equals ("net.minecraft.util.StringTranslate" )) {
30
30
return patchStringTranslate (bytes , false );
31
31
} else if (name .equals ("net.minecraft.client.Minecraft" )) {
32
32
return patchMinecraft (bytes , LoadingPlugin .isGameObfuscated ());
33
- } else if (name .equals ("u " ) || name .equals ("net.minecraft.util.ChatAllowedCharacters" )) {
33
+ } else if (name .equals ("v " ) || name .equals ("net.minecraft.util.ChatAllowedCharacters" )) {
34
34
return patchAllowedCharacters (bytes );
35
35
}
36
36
return bytes ;
@@ -44,11 +44,11 @@ private byte[] patchStringTranslate(byte[] bytes, boolean obf) {
44
44
ClassNode clazz = Utils .readClass (bytes );
45
45
46
46
final String findMethod = obf ? "a" : "setLanguage" ;
47
- final String isUnicode = obf ? "e " : "isUnicode" ;
48
- final String currentLanguage = obf ? "d " : "currentLanguage" ;
47
+ final String isUnicode = obf ? "f " : "isUnicode" ;
48
+ final String currentLanguage = obf ? "e " : "currentLanguage" ;
49
49
50
50
for (MethodNode method : clazz .methods ) {
51
- if (method .name .equals (findMethod ) && method .desc .equals (Type .getMethodDescriptor (Type .VOID_TYPE , Type .getType (String .class )))) {
51
+ if (method .name .equals (findMethod ) && method .desc .equals (Type .getMethodDescriptor (Type .VOID_TYPE , Type .getType (String .class ), Type . BOOLEAN_TYPE ))) {
52
52
53
53
ListIterator <AbstractInsnNode > iter = method .instructions .iterator ();
54
54
@@ -91,7 +91,7 @@ private byte[] patchStringTranslate(byte[] bytes, boolean obf) {
91
91
*/
92
92
private byte [] patchMinecraft (byte [] bytes , boolean obf ) {
93
93
ClassNode clazz = Utils .readClass (bytes );
94
- final Type fondRenderer = Utils .getObjectType (obf ? "atq " : "net.minecraft.client.gui.FontRenderer" );
94
+ final Type fondRenderer = Utils .getObjectType (obf ? "awv " : "net.minecraft.client.gui.FontRenderer" );
95
95
final String startGame = obf ? "a" : "startGame" ;
96
96
97
97
for (MethodNode method : clazz .methods ) {
0 commit comments