public static IModule ReadModule(NBTag tag)
        {
            string moduleID = tag["ID"].GetString();

            if (!FactoriesById.ContainsKey(moduleID))
            {
                return(null);
            }
            IModuleFactory factory = GetFactoryByID(moduleID);
            IModule        module  = factory.GetInstance();

            if (tag.Contains("Properties"))
            {
            }

            module.ReadSettings(tag["Settings"]);

            return(module);
        }
        public static IModule ReadModule(Stream stream)
        {
            BinaryReader reader         = new BinaryReader(stream);
            string       moduleID       = reader.ReadString();
            int          settingsLength = reader.ReadInt32();

            if (FactoriesById.ContainsKey(moduleID))
            {
                IModuleFactory factory = GetFactoryByID(moduleID);
                IModule        module  = factory.GetInstance();
                //module.ReadSettings( reader, settingsLength );
                return(module);
            }
            else
            {
                stream.Seek(settingsLength, SeekOrigin.Current);
                return(null);
            }
        }