diff --git a/src/main/java/electroblob/wizardry/item/ItemWizardArmour.java b/src/main/java/electroblob/wizardry/item/ItemWizardArmour.java index 494f1dd5..63484b97 100644 --- a/src/main/java/electroblob/wizardry/item/ItemWizardArmour.java +++ b/src/main/java/electroblob/wizardry/item/ItemWizardArmour.java @@ -163,15 +163,26 @@ public class ItemWizardArmour extends ItemArmor { * the armor value. It is also what handles armor toughness, but the wizard armor had a value of 0 for that. */ @Override - public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) { + public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){ + Multimap map = HashMultimap.create(); - if(stack.getItemDamage() < stack.getMaxDamage() && this.armorType == slot) { + + if(stack.getItemDamage() < stack.getMaxDamage() && this.armorType == slot){ + int defense = reductions[slot.getIndex()]; - if(stack.hasTagCompound() && stack.getTagCompound().getBoolean("legendary")) + float toughness = 0f; + + if(stack.hasTagCompound() && stack.getTagCompound().getBoolean("legendary")) { defense = ArmorMaterial.DIAMOND.getDamageReductionAmount(slot); + toughness = ArmorMaterial.DIAMOND.getToughness(); + } + map.put(SharedMonsterAttributes.ARMOR.getName(), new AttributeModifier(ARMOR_MODIFIERS[slot.getIndex()], "Armor modifier", defense, 0)); + map.put(SharedMonsterAttributes.ARMOR.getName(), new AttributeModifier(ARMOR_MODIFIERS[slot.getIndex()], + "Armor toughness", toughness, 0)); } + return map; }