Advertisement
PaleoCrafter

getItemEnchantability

Jul 21st, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. MethodNode method = new MethodNode(ACC_PUBLIC, "getItemEnchantability", "()I", null, null);
  2. method.instructions.add(new FieldInsnNode(GETFIELD, "net/minecraft/item/ItemHoe", "theToolMaterial", Type.getObjectType("net/minecraft/item/Item$ToolMaterial").toString()));
  3. method.instructions.add(new MethodInsnNode(INVOKEVIRTUAL, "net/minecraft/item/Item$ToolMaterial", "getEnchantability", "()I"));
  4. method.instructions.add(new InsnNode(IRETURN));
  5. clazz.methods.add(method);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement