public ModInfo ToInfo(Analyzer analyzer) { ModInfo info = new ModInfo() { ID = this.ID, Name = this.Name, Description = this.Description, Version = this.Version, URL = this.URL, Credits = this.Credits, Authors = this.Authors, }; if (this.MinecraftVersion != null) { info.MinecraftVersion = VersionTools.ToVersion(this.MinecraftVersion); } string[] dependencies = null; if (this.Dependencies1 != null && this.Dependencies1.Length > 0) { dependencies = this.Dependencies1; } else if (this.Dependencies2 != null && this.Dependencies2.Length > 0) { dependencies = this.Dependencies2; } if (dependencies != null) { info.Dependencies = VersionTools.AllToVersion(dependencies); } if (this.LogoFile != null) { info.Logo = analyzer.ReadFile(this.LogoFile); } return(info); }