Minor Living Armor cleanup

This commit is contained in:
Nick 2016-01-28 22:37:19 -08:00
parent 3da5734225
commit e0fcf10a1b
10 changed files with 41 additions and 94 deletions

View file

@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
@ -238,4 +239,13 @@ public class LivingArmour implements ILivingArmour
{
writeToNBT(tag, true);
}
public static boolean hasFullSet(EntityPlayer player) {
for (int slot = 0; slot < player.inventory.armorInventory.length; slot++) {
if (!(player.inventory.armorItemInSlot(slot).getItem() instanceof ItemLivingArmour))
return false;
}
return true;
}
}