NBTTagList nbttaglist = nbttagcompound.getTagList("stackList");
theInventory = new ItemStack [nbttaglist.tagCount()];
for (int i = 0; i < theInventory.length; ++i) {
NBTTagCompound nbttagcompound2 = (NBTTagCompound) nbttaglist
.tagAt(i);
if (!nbttagcompound2.getBoolean("isNull")) {
theInventory [i] = ItemStack.loadItemStackFromNBT(nbttagcompound2);
}