internal Instance(Context context, string gameFolder, InstanceDescription description) { Context = context; GameFolder = gameFolder; AssetsFolder = context.AssetsFolder; VersionsFolder = context.VersionsFolder; LibraryFolder = context.LibraryFolder; Description = description; MinecraftVersion = description.Version; ModsStoreFolder = context.ModsStoreFolder; string descriptionFile = Path.Combine (gameFolder, "craftalyst-instance.json"); if (File.Exists (descriptionFile)) { using (var sr = new StreamReader(descriptionFile)) Description = InstanceDescription.Parse (sr.ReadToEnd ()); } else { Description = new InstanceDescription() { Name = "Minecraft", Description = "A game about blocks", SyncUrl = "", Version = MinecraftVersion, Mods = new List<ModDescription>() }; } }
public DedicatedLauncher() { Craft = new Context (); Craft.AppName = "Craftalyst Launcher"; Craft.AppVersion = "0.6.0"; singleton = this; }
public InstanceSelectionDialog(Context craftalyst) { this.Build (); Context = craftalyst; instanceList.AddColumn("Name", 1); instanceList.AddColumn("Server", 2); instanceList.AddColumn("ID", 3); RefreshInstances(); }
public static void Main(string[] args) { var craftalyst = new Context (); craftalyst.AppName = "Craftalyst 1337 Launcher"; craftalyst.AppVersion = "0.0.1a6"; craftalyst.AppId = "CraftalystLauncher"; string username = ""; string password = ""; MinecraftSession session = null; while (true) { Console.WriteLine (); Console.WriteLine ("Craftalyst {0}", Context.Version); Console.WriteLine ("Warning: The server play.tirrin.com will control what software components are downloaded and from where."); Console.WriteLine (" Only use Craftalyst with servers you trust."); Console.WriteLine (); Console.WriteLine ("(C) 2014 rezonaut"); Console.Write ("Minecraft Login : "******" Password : "******"Invalid Login: "******"Let's do this!"); Console.WriteLine (); Instance instance = craftalyst.GetOrCreateInstance("CraftalystTest", new InstanceDescription() { Version = "1.6.4-forge", Name = "Tirrin", Description = "Client instance for Tirrin server", SyncUrl = "http://play.tirrin.com:8080/craftalyst", SyncConfigs = new List<string>(), Mods = new List<ModDescription>(), ConfigVersion = 0 }); var mc = instance.CreateMinecraft(); mc.Start(session); }