Posted June 8, 20223 yr Is there a method in 1.18.X to check when an armor item takes damage within it's own class? In 1.16.5 I remember seeing damageArmor() override or something similar accessible by classes extended from ItemArmor which served this purpose. I am also looking for a way to get the durability loss caused by a damage source. If this is possible (from either inside armor class or event), does it take the Unbreaking enchantment into account? Thanks in advance. Edited June 9, 20223 yr by CrackedScreen Thread marked as solved.
June 8, 20223 yr I don't believe so, I had to manage this with eventhandlers and the interface IDamageHandlingArmor. I could be wrong, though Edited June 8, 20223 yr by PCDCreeper
June 8, 20223 yr Author DamageItem works fine, but doesn't account for durability loss cancelled by Unbreaking enchantments. Is this something I will need to handle myself, or are there other accessible fields I can use inside this method? Edited June 8, 20223 yr by CrackedScreen
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.