}
public void writeToNBT(NBTTagCompound nbttagcompound) {
super.writeToNBT(nbttagcompound);
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < theInventory.length; ++i) {
NBTTagCompound nbttagcompound2 = new NBTTagCompound ();
nbttaglist.appendTag(nbttagcompound2);
if (theInventory[i] == null) {
nbttagcompound2.setBoolean("isNull", true);
} else {
nbttagcompound2.setBoolean("isNull", false);
theInventory[i].writeToNBT(nbttagcompound2);