예제 #1
0
        /// <summary>
        /// Initializes a new instance from the given config file
        /// </summary>
        /// <param name="config">A config file containing the instance data</param>
        /// <pparam name="rootDir">The instance's root directory</pparam>
        public Instance(ConfigFile config, string rootDir, bool autosave = true)
        {
            this.cfgFile = config;
            this.rootDir = rootDir;

            this.autosave = autosave;

            InstMods = new InstanceMods(this);
            InstMods.Update();

            Console.WriteLine(MinecraftDir);
        }
예제 #2
0
        public Instance(string name, string rootDir, bool autosave = true)
        {
            this.cfgFile = new ConfigFile();

            this.Name    = name;
            this.RootDir = rootDir;

            this.autosave = autosave;

            InstMods = new InstanceMods(this);
            InstMods.Update();

            Console.WriteLine(MinecraftDir);

            AutoSave();
        }
예제 #3
0
        public Instance(OldInstance oldInst)
        {
            this.cfgFile = new ConfigFile();
            this.rootDir = oldInst.RootDir;

            this.autosave = true;

            InstMods = new InstanceMods(this);
            InstMods.Update();

            this.IconKey      = oldInst.IconKey;
            this.Name         = oldInst.Name;
            this.NeedsRebuild = oldInst.NeedsRebuild;

            Console.WriteLine(MinecraftDir);
            //this.Notes = oldInst.Notes;
        }