Posted June 15, 20187 yr I'm creating a custom armor that works differently to normal armor. I tried creating a custom armor class by copying some methods I thought were important from ItemArmor. Namely these are dispenseStack, getEquipmentSlot, onItemRightClick, getItemAttributeModifiers and a few others. However I can't even equip the armor in game. So what do I need to do to create a wearable item? The armor should only reduce certain types of damage when it has charge. Is it best to use damage events for this? Thanks. Edited June 15, 20187 yr by Melonslise
June 15, 20187 yr Author 1 hour ago, diesieben07 said: Override Item#isValidArmor and Item#getEquipmentSlot. However note that you can probably achieve this with ItemArmor already by implementing ISpecialArmor. Using isValidArmor worked, but I noticed a few issues. 1. I can't shift-click or right-click the armor to equip it for some reason. I copied the onItemRightClicked method from ItemArmor so not sure what's wrong there. And I have no idea where to look for the shift-click code. 2. I couldn't find getEquipmentSlot in Item. It seems the getEquipmentSlot method in ItemArmor is used only for the renderer. 3. How would I specify a renderer for the custom armor I made? I'm guessing by overriding getArmorModel? Thanks. Edited June 15, 20187 yr by Melonslise
June 15, 20187 yr Author 8 minutes ago, diesieben07 said: Update Forge. Armor can be equipped using right-click, not shift-right-click. 1. I'm using the latest version of 1.12.2 forge. I got it like yesterday. 2. I meant that armor can be equipped by either right-clicking during gameplay or shift-left-clicking when in inventory. EDIT: Nevermind, for some reason I had forge 14.21 installed. Must've misclicked. Edited June 15, 20187 yr by Melonslise
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.