Posted November 14, 201212 yr I was looking into adding some custom armors ect. for my mod, however I'm having trouble working out how to add my custom armor/ repair item combo to the anvil repair system. From what I have seen it looks like it has to do with func_82845_b at the bottom of EnumArmorMaterial, if so is there a way to add it without editing the Enum? Any help is greatly appreciated Cheers, Alpha.
November 15, 201212 yr Author I'm still having an issue with this, I can get it to work no problem by adding it into the enum, however anything I try to get it to work outside of this fails, is there something obvious that I'm missing? Thanks if you do respond - Alpha.
December 2, 201212 yr public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return Your_Item == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); } just add this to all your Amor parts (helmet, leggings, chest and boots), Your_Item is the item you want to repair the armor.
December 2, 201212 yr Hi, i was having the same problem, however, when i put it in my armor parts it gives me the error, "Incompatible operand types Item and int".
December 4, 201212 yr when i do that it gives me the error, "itemID cannot be resolved or is not a field".
December 5, 201212 yr Thanks i finally got it working. sorry about the trouble i caused, i'm new at this.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.