Fixed some minor bugs with the Living Armour

This commit is contained in:
WayofTime 2016-04-04 19:24:43 -04:00
parent 0755202a35
commit 1c6c7ba0a6
2 changed files with 4 additions and 3 deletions

View file

@ -9,6 +9,7 @@ import WayofTime.bloodmagic.livingArmour.LivingArmour;
import WayofTime.bloodmagic.registry.ModItems; import WayofTime.bloodmagic.registry.ModItems;
import WayofTime.bloodmagic.util.helper.TextHelper; import WayofTime.bloodmagic.util.helper.TextHelper;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import net.minecraft.client.renderer.ItemMeshDefinition; import net.minecraft.client.renderer.ItemMeshDefinition;
@ -248,14 +249,14 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
@Override @Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack)
{ {
if (this == ModItems.livingArmourChest && isEnabled(stack)) if (this == ModItems.livingArmourChest && isEnabled(stack) && slot == EntityEquipmentSlot.CHEST)
{ {
LivingArmour armour = ItemLivingArmour.getLivingArmour(stack); LivingArmour armour = ItemLivingArmour.getLivingArmour(stack);
return armour.getAttributeModifiers(); return armour.getAttributeModifiers();
} }
return super.getAttributeModifiers(slot, stack); return HashMultimap.<String, AttributeModifier>create();
} }
@Override @Override

View file

@ -18,7 +18,7 @@ public class StatTrackerPhysicalProtect extends StatTracker
public int totalDamage = 0; public int totalDamage = 0;
public static HashMap<LivingArmour, Double> changeMap = new HashMap<LivingArmour, Double>(); public static HashMap<LivingArmour, Double> changeMap = new HashMap<LivingArmour, Double>();
public static int[] damageRequired = new int[] { 30, 200, 400, 800, 1500, 2500, 3500, 5000, 6000 }; public static int[] damageRequired = new int[] { 30, 200, 400, 800, 1500, 2500, 3500, 5000, 7000, 15000 };
public static void incrementCounter(LivingArmour armour, double damage) public static void incrementCounter(LivingArmour armour, double damage)
{ {