Merge branch '1.8-Rewrite' of https://github.com/WayofTime/BloodMagic into 1.8-Rewrite

This commit is contained in:
WayofTime 2016-01-30 06:46:01 -05:00
commit 8d854a5b69
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
------------------------------------------------------
Version 2.0.0-11
------------------------------------------------------
- Fix NPE when checking if a player has a full Living Armor set
------------------------------------------------------
Version 2.0.0-10
------------------------------------------------------

View file

@ -8,6 +8,7 @@ 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.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World;
@ -242,7 +243,8 @@ public class LivingArmour implements ILivingArmour
public static boolean hasFullSet(EntityPlayer player) {
for (int slot = 0; slot < player.inventory.armorInventory.length; slot++) {
if (!(player.inventory.armorItemInSlot(slot).getItem() instanceof ItemLivingArmour))
ItemStack slotStack = player.inventory.armorItemInSlot(slot);
if (slotStack != null && !(slotStack.getItem() instanceof ItemLivingArmour))
return false;
}