Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.FieldInsnNode


        while (insns.hasNext()) {
          AbstractInsnNode i = insns.next();

          if (i.getOpcode() == Opcodes.GETSTATIC && i.getNext().getOpcode() == Opcodes.IF_ACMPEQ) {
            System.out.println("Found insertion point - GETSTATIC followed by IF_ACMPEQ!");
            FieldInsnNode f = (FieldInsnNode) i;
            System.out.println("Does " + f.owner + " equal " + names.get("blockDispenser_JavaName") + "?");



            System.out.println("Found landmark! Inserting code...");
View Full Code Here


            for (ListIterator<AbstractInsnNode> it = m.instructions.iterator(); it.hasNext(); )
            {
                AbstractInsnNode insnNode = it.next();
                if (insnNode.getType() == AbstractInsnNode.FIELD_INSN)
                {
                    FieldInsnNode fi = (FieldInsnNode)insnNode;
                    if (itemField.name.equals(fi.name) && fi.getOpcode() == Opcodes.GETFIELD)
                    {
                        it.remove();
                        MethodInsnNode replace = new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "net/minecraft/item/ItemStack",getItemMethod.name, getItemMethod.desc, false);
                        it.add(replace);
                    }
View Full Code Here

TOP

Related Classes of org.objectweb.asm.tree.FieldInsnNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.