Пример #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            ParamentsGen ParaGen_ryu = new ParamentsGen();
            JObject      JsonObj_jrt = new JObject();

            Player_van.SetPlayerName("Hikaze");
            Player_van.RegenerateUUID();
            string MainPara_hln = ParaGen_ryu.CombineParaments
                                  (
                Player_van,
                "D:\\mc",
                "1.12.2-OptiFine_HD_U_E3",
                configure_ljc.ExtraJVMPara + configure_ljc.ExtraMCPara,
                configure_ljc.MaxMem,
                configure_ljc.MinMem,
                false
                                  );

            File.WriteAllText(@".\HikazeLauncher\Last Parameters.log", configure_ljc.JavaPath + " " + MainPara_hln);
            Process          Process_xb       = new Process();
            ProcessStartInfo ProcessStart_hhh = new ProcessStartInfo(configure_ljc.JavaPath, MainPara_hln);

            Process_xb.StartInfo = ProcessStart_hhh;
            Process_xb.StartInfo.UseShellExecute = false;
            Process_xb.Start();
            Close();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Playerinfo playerInfo1 = new Playerinfo();

            playerInfo1.SetPlayerName("Hikaze");
            playerInfo1.RegenerateUUID();
            string fp = System.Environment.CurrentDirectory + "\\info.json";

            if (!File.Exists(fp))  // 判断是否已有相同文件
            {
                FileStream fs1 = new FileStream(fp, FileMode.Create, FileAccess.ReadWrite);
                fs1.Close();
            }
            File.WriteAllText(fp, JsonConvert.SerializeObject(playerInfo1));
        }
Пример #3
0
        static void Main(string[] args)
        {
            /*-Dminecraft.client.jar=D:\\mc\\.minecraft\\versions\\1.12.2-OptiFine_HD_U_E3\\1.12.2-OptiFine_HD_U_E3.jar
             * -XX:-UseAdaptiveSizePolicy
             * -XX:-OmitStackTraceInFastThrow
             * -Dfml.ignoreInvalidMinecraftCertificates=true
             * -Dfml.ignorePatchDiscrepancies=true
             * -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
             * -Djava.library.path=D:\\mc\\.minecraft\\versions\\1.12.2-OptiFine_HD_U_E3\\1.12.2-OptiFine_HD_U_E3-natives
             * \"-Dminecraft.launcher.brand=Hello Minecraft! Launcher\"
             * -Dminecraft.launcher.version=2.7.9.55";
             */
            ParamentsGen ParaGen01 = new ParamentsGen();
            Playerinfo   player1   = new Playerinfo();

            player1.SetPlayerName("Hikaze");
            player1.RegenerateUUID();
            string ext = "-XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true ";
            string a   = ParaGen01.CombineParaments(player1, "", "D:\\mc", "1.12.2-OptiFine_HD_U_E3", ext, 4096, 2048, false);

            Console.WriteLine(a);
            Process          p = new Process();
            ProcessStartInfo s = new ProcessStartInfo("\"C:\\Program Files\\AdoptOpenJDK\\jdk-8.0.202.08\\bin\\java.exe\"", a);

            s.UseShellExecute        = false;
            s.RedirectStandardOutput = true;
            p.StartInfo = s;
            p.Start();
            //Console.WriteLine( ParaGen01.GetJarPackName("org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2"));
            //JObject j1 =new JObject { { "name", 123 } };
            //ArrayList arr1 = new ArrayList();
            //ParaGen01.GetPacksFromJson("D:\\mc", "1.12.2-OptiFine_HD_U_E3", arr1);
            //ParaGen01.ConvertPackNameFromList(arr1);
            //arr1 = ParaGen01.RemoveDuplicate(arr1);
            //for (int i = 0; i < arr1.Count; i++)
            //{
            //    Console.WriteLine(arr1[i]);
            //}
        }