Ejemplo n.º 1
0
        string ArgumentsJson(string json)
        {
            fabricmcInstall fabricmcInstall = new fabricmcInstall();
            string          Arg             = fabricmcInstall.ArgumentsJson(json);

            Arg = Arg.Substring(0, Arg.Length - 1);
            string[] ArgArray = Arg.Split(',');
            Arg = "";
            for (int i = 1; i < ArgArray.Length; i += 2)
            {
                if (ArgArray[i - 1] == "--tweakClass" ? ArgArray[i] == "net.fabricmc.loader.launch.FabricClientTweaker" ? true : false : false)
                {
                    continue;
                }
                Arg += ArgArray[i - 1] + "," + ArgArray[i] + ",";
            }
            return(Arg.Substring(0, Arg.Length - 1));
        }
Ejemplo n.º 2
0
        public async Task <bool> FabricmcVersionInstall(string version, string loaderVersion)
        {
            var  MCversion = tools.GetAllTheExistingVersion();
            bool ret       = false;
            await Task.Factory.StartNew(() =>
            {
                foreach (var i in MCversion)
                {
                    if (i.version == version)
                    {
                        string mc = i.IdVersion;
                        fabricmcInstall fabricmcInstall = new fabricmcInstall();
                        fabricmcInstall.GetLoaderVersionJson(loaderVersion, version, mc);
                        ret = true;
                    }
                }
            });

            return(ret);
        }