diff --git a/common/src/main/java/common/entity/npc/EntityNPC.java b/common/src/main/java/common/entity/npc/EntityNPC.java index 2c6f649e..d1792dd1 100755 --- a/common/src/main/java/common/entity/npc/EntityNPC.java +++ b/common/src/main/java/common/entity/npc/EntityNPC.java @@ -2763,8 +2763,11 @@ public abstract class EntityNPC extends EntityLiving implements IInventory public int getInventoryWeight() { int total = 0; - for(int z = 0; z < Equipment.INVENTORY_SLOTS; z++) { - ItemStack stack = this.getInventory()[z]; + for(ItemStack stack : this.getInventory()) { + if(stack != null) + total += stack.getSize() * stack.getItem().getWeight(); + } + for(ItemStack stack : this.getArmor()) { if(stack != null) total += stack.getSize() * stack.getItem().getWeight(); }