for (byte slot = 0; slot < tanks.size(); slot++) {
StandardTank tank = tanks.get(slot);
if (tank.getFluid() != null) {
NBTTagCompound tag = new NBTTagCompound();
tag.setByte("tank", slot);
tank.writeToNBT(tag);
tagList.appendTag(tag);
}
}
data.setTag("tanks", tagList);
}