Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MethodNode method = new MethodNode(ACC_PUBLIC, "getItemEnchantability", "()I", null, null);
- method.instructions.add(new FieldInsnNode(GETFIELD, "net/minecraft/item/ItemHoe", "theToolMaterial", Type.getObjectType("net/minecraft/item/Item$ToolMaterial").toString()));
- method.instructions.add(new MethodInsnNode(INVOKEVIRTUAL, "net/minecraft/item/Item$ToolMaterial", "getEnchantability", "()I"));
- method.instructions.add(new InsnNode(IRETURN));
- clazz.methods.add(method);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement