fix armor... again (#2898)

This commit is contained in:
MoriyaShiine authored and Vincent Lee committed 2019-04-29 21:53:22 -05:00
1 parent 63c364b020
commit 6e6dc44a5e
2 files changed
+2 -14

No files matched your search

@@ -10,7 +10,6 @@
*/
package vazkii.botania.common.item.equipment.armor.manasteel;
import com.google.common.collect.Multimap;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.model.ModelBiped;
@@ -19,8 +18,6 @@ import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor;
@@ -88,16 +85,7 @@ public class ItemManasteelArmor extends ItemArmor implements ISpecialArmor, IMan
@Override
public int getArmorDisplay(EntityPlayer player, @Nonnull ItemStack armor, int slot) {
return damageReduceAmount;
}
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) {
Multimap<String, AttributeModifier> attrib = super.getAttributeModifiers(slot, stack);
// Remove these or else vanilla will double count it and ISpecialArmor
attrib.removeAll(SharedMonsterAttributes.ARMOR.getName());
attrib.removeAll(SharedMonsterAttributes.ARMOR_TOUGHNESS.getName());
return attrib;
return 0;
}
@Override
@@ -60,7 +60,7 @@ public class ItemTerrasteelArmor extends ItemManasteelArmor {
Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(slot, stack);
UUID uuid = new UUID((getTranslationKey(stack) + slot.toString()).hashCode(), 0);
if (slot == armorType) {
multimap.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getName(), new AttributeModifier(uuid, "Terrasteel modifier " + type, (double) getArmorDisplay(null, new ItemStack(this), type.getIndex()) / 20, 0));
multimap.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getName(), new AttributeModifier(uuid, "Terrasteel modifier " + type, (double) damageReduceAmount / 20, 0));
}
return multimap;
}