fixed errors, will need to be updated for newer forge versions
This commit is contained in:
parent
c0b2664331
commit
e2e8ecb213
1 changed files with 6 additions and 2 deletions
|
@ -79,7 +79,9 @@ public class ASMTweaker implements IClassTransformer
|
|||
MethodNode newNode = new MethodNode( Opcodes.ACC_PUBLIC, "func_146977_a_original", mn.desc, mn.signature, new String[0] );
|
||||
newNode.instructions.add( new VarInsnNode( Opcodes.ALOAD, 0 ) );
|
||||
newNode.instructions.add( new VarInsnNode( Opcodes.ALOAD, 1 ) );
|
||||
newNode.instructions.add( new MethodInsnNode( Opcodes.INVOKESPECIAL, classNode.name, mn.name, mn.desc, false ) );
|
||||
//newNode.instructions.add( new MethodInsnNode( Opcodes.INVOKESPECIAL, classNode.name, mn.name, mn.desc, false ) );
|
||||
// TODO: Update for newer forge
|
||||
newNode.instructions.add( new MethodInsnNode( Opcodes.INVOKESPECIAL, classNode.name, mn.name, mn.desc ) );
|
||||
newNode.instructions.add( new InsnNode( Opcodes.RETURN ) );
|
||||
log( newNode.name + newNode.desc + " - New Method" );
|
||||
classNode.methods.add( newNode );
|
||||
|
@ -101,7 +103,9 @@ public class ASMTweaker implements IClassTransformer
|
|||
if ( n.name.equals( "func_146977_a" ) || (n.name.equals( "a" ) && n.desc.equals( "(Lzk;)V" )) )
|
||||
{
|
||||
log( n.name + n.desc + " - Invoke Virtual" );
|
||||
mn.instructions.insertBefore( n, new MethodInsnNode( Opcodes.INVOKEVIRTUAL, n.owner, n.name, n.desc, false ) );
|
||||
//mn.instructions.insertBefore( n, new MethodInsnNode( Opcodes.INVOKEVIRTUAL, n.owner, n.name, n.desc, false ) );
|
||||
// TODO: Update for newer forge
|
||||
mn.instructions.insertBefore( n, new MethodInsnNode( Opcodes.INVOKEVIRTUAL, n.owner, n.name, n.desc ) );
|
||||
mn.instructions.remove( in );
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue