diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 21e583ec..83c4832f 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ # -#Fri Mar 18 12:08:18 EDT 2016 +#Sat Mar 19 08:23:11 EDT 2016 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert org.eclipse.jdt.core.formatter.brace_position_for_block=next_line org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert @@ -288,10 +288,10 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line eclipse.preferences.version=1 -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 diff --git a/src/main/java/WayofTime/bloodmagic/livingArmour/LivingArmour.java b/src/main/java/WayofTime/bloodmagic/livingArmour/LivingArmour.java index 6f227bb6..6387c800 100644 --- a/src/main/java/WayofTime/bloodmagic/livingArmour/LivingArmour.java +++ b/src/main/java/WayofTime/bloodmagic/livingArmour/LivingArmour.java @@ -8,10 +8,13 @@ import WayofTime.bloodmagic.api.livingArmour.StatTracker; import WayofTime.bloodmagic.item.armour.ItemLivingArmour; import WayofTime.bloodmagic.util.ChatUtil; import WayofTime.bloodmagic.util.helper.TextHelper; + import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; + import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; @@ -294,9 +297,13 @@ public class LivingArmour implements ILivingArmour public static boolean hasFullSet(EntityPlayer player) { - for (int slot = 0; slot < player.inventory.armorInventory.length; slot++) + for (EntityEquipmentSlot slot : EntityEquipmentSlot.values()) { - ItemStack slotStack = player.inventory.armorItemInSlot(slot); + if (slot.getSlotType() != EntityEquipmentSlot.Type.ARMOR) + { + continue; + } + ItemStack slotStack = player.getItemStackFromSlot(slot); if (slotStack == null || !(slotStack.getItem() instanceof ItemLivingArmour)) return false; }