gpt4 book ai didi

java - MineCraft 启动器代码无法使用 CSharp

转载 作者:太空宇宙 更新时间:2023-11-03 15:16:44 26 4
gpt4 key购买 nike

我有一个 Minecraft 客户端启动器,但它无法启动 Minecraft。我尝试了 TeamExtreme 中的参数,但失败了。 [原文为匈牙利,现翻译]

启动器代码:

        private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text.Length == 0)
{
MessageBox.Show("please enter username!");
}
else
{
button1.Enabled = false;
button1.Text = "loading";
string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string teamcraft = appdata + "\\.RedMineCraft\\minecraft.jar";
string tcfolder = appdata + "\\.RedMineCraft";
WebClient client = new WebClient();
WebClient client2 = new WebClient();
client.DownloadFileAsync(new Uri("http://www.redminecraft.eu/cliens/minecraft.jar"), appdata + "\\.RedMineCraft\\minecraft.jar");
client2.DownloadFileAsync(new Uri("http://www.redminecraft.eu/cliens/servers.dat"), appdata + "\\.RedMineCraft\\servers.dat");


File.SetAttributes(appdata + "\\.RedMineCraft\\servers.dat", FileAttributes.Hidden);


bool folderExists4 = System.IO.Directory.Exists(tcfolder + "\\resourcepacks");
if (!folderExists4)
Directory.CreateDirectory(tcfolder + "\\resourcepacks");
client.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed61);
}
}

private void Completed61(object sender, AsyncCompletedEventArgs e)

{

string userpath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string teamcraft = appdata + "\\.RedMineCraft\\minecraft.jar";
string refolder = appdata + "\\.RedMineCraft";
string assetdir = userpath + "\\.RedMineCraft\\assets";
string filePath = userpath + @"\.RedMineCraft\runtime\bin\javaw.exe";
string programdata = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
string prog = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
string uname = textBox1.Text;
File.SetAttributes(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\.RedMineCraft\\servers.dat", FileAttributes.Hidden);

if (File.Exists(filePath))
{
ProcessStartInfo p = new ProcessStartInfo();
p.FileName = filePath;
p.CreateNoWindow = true;

p.Arguments = @"-Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Djava.library.path=" + userpath + @"\.RedMineCraft\versions\1.8\1.8-natives-244034800030620 -cp " + userpath + @"\.RedMineCraft\libraries\com\mojang\netty\1.6\netty-1.6.jar;" + userpath + @"\.RedMineCraft\libraries\java3d\vecmath\1.5.2\vecmath-1.5.2.jar;" + userpath + @"\.RedMineCraft\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;" + userpath + @"\.RedMineCraft\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;" + userpath + @"\.RedMineCraft\libraries\net\sf\jopt-simple\jopt-simple\4.6\jopt-simple-4.6.jar;" + userpath + @"\.RedMineCraft\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;" + userpath + @"\.RedMineCraft\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;" + userpath + @"\.RedMineCraft\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;" + userpath + @"\.RedMineCraft\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;" + userpath + @"\.RedMineCraft\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;" + userpath + @"\.RedMineCraft\libraries\io\netty\netty-all\4.0.15.Final\netty-all-4.0.15.Final.jar;" + userpath + @"\.RedMineCraft\libraries\com\google\guava\guava\17.0\guava-17.0.jar;" + userpath + @"\.RedMineCraft\libraries\org\apache\commons\commons-lang3\3.3.2\commons-lang3-3.3.2.jar;" + userpath + @"\.RedMineCraft\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;" + userpath + @"\.RedMineCraft\libraries\commons-codec\commons-codec\1.9\commons-codec-1.9.jar;" + userpath + @"\.RedMineCraft\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;" + userpath + @"\.RedMineCraft\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;" + userpath + @"\.RedMineCraft\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;" + userpath + @"\.RedMineCraft\libraries\com\mojang\authlib\1.5.21\authlib-1.5.21.jar;" + userpath + @"\.RedMineCraft\libraries\com\mojang\realms\1.6.1\realms-1.6.1.jar;" + userpath + @"\.RedMineCraft\libraries\org\apache\commons\commons-compress\1.8.1\commons-compress-1.8.1.jar;" + userpath + @"\.RedMineCraft\libraries\org\apache\httpcomponents\httpclient\4.3.3\httpclient-4.3.3.jar;" + userpath + @"\.RedMineCraft\libraries\commons-logging\commons-logging\1.1.3\commons-logging-1.1.3.jar;" + userpath + @"\.RedMineCraft\libraries\org\apache\httpcomponents\httpcore\4.3.2\httpcore-4.3.2.jar;" + userpath + @"\.RedMineCraft\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;" + userpath + @"\.RedMineCraft\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;" + userpath + @"\.RedMineCraft\libraries\org\lwjgl\lwjgl\lwjgl\2.9.1\lwjgl-2.9.1.jar;" + userpath + @"\.RedMineCraft\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.1\lwjgl_util-2.9.1.jar;" + userpath + @"\.RedMineCraft\libraries\tv\twitch\twitch\6.5\twitch-6.5.jar;" + userpath + @"\.RedMineCraft\versions\1.8\1.8.jar " + teamcraft + " net.minecraft.client.main.Main --accessToken 00000:000000000 --uuid " + uname + " --version 1.8 --assetIndex 1.8" + " --gameDir " + userpath + "\\.RedMineCraft --assetsDir " + assetdir + " --userProperties {} --username " + uname;
Process.Start(p);
Application.Exit();



}
else
{
MessageBox.Show("Kérlek teleptsd újra a klienst! Valami nem lett jól telepítve!");
}


}

抱歉我的英语不好

最佳答案

我只想尝试重新启动您的计算机并重新启动 Minecraft。如果这不起作用,我只需通过硬盘备份重新安装 Minecraft希望这对您有所帮助 ~YouDontNeedToKnowMyName123YT(又名 scratchndent(在我的世界上))

关于java - MineCraft 启动器代码无法使用 CSharp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38812789/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com