Jump to content

Adding Armors to the Anvil Repair System


AlphaToOmegaMC

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.