我为Minecraft 1.12编写了一个机器人的代码,但它不起作用,你能帮助我吗?
这是代码:
private void button1_Click(object sender, EventArgs e)
{
TcpClient client = new TcpClient(IP.Text, Int32.Parse(PORT.Text));
NetworkStream stream = client.GetStream();
stream.Flush();
BinaryWriter wr = new BinaryWriter(stream);
byte PacketID = 0x35;
byte ProtocolVersion = 35;
string Username = "Name";
Username.PadRight(64, ' ');
string VerificationKey = password.Text;
VerificationKey.PadRight(64, ' ');
wr.Write(PacketID);
wr.Write(ProtocolVersion);
wr.Write(Username);
wr.Write(VerificationKey);
BinaryReader rea = new BinaryReader(stream);
richTextBox1.Text = rea.Read().ToString();
}
}
}
我按照本教程进行了制作:https://facepunch.com/showthread.php?t=923764