Interacting with Minecraft using TCP #3390
-
Minelayer is indeed a commendable library, and I am learning about the TCP protocol through it. I tried to interact with Minecraft's Spigot server by imitating Minelayer's way and content of sending packets, but I encountered an issue. The process of sending the package is as follows: handshake pack
I actually sent a hexadecimal packet like this: login start pack
Same as above Now, there's a problem here login acknowledged
like this But the server gave me feedback on an error:
So can any experienced individuals tell me what problems have arisen. thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
You can read https://wiki.vg/Protocol Minecraft expects a specific protocol, you cannot simply take a guess and have it working. |
Beta Was this translation helpful? Give feedback.
-
New progressI noticed that the server sent a packet: OtherI have discovered some related websites again, although there are only a small amount of related content among them |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Non optimal answer
resolvent
For packets with a length less than the threshold, we only need to add 0 to their 'length' and 'ID', for example:
\x01\x03
becomes\x02\x00\x03
So we just need to send out the
login confirmation
package in this formNon optimal reasons
New issues
After sending the
Login Confirmation
package, I sent theKnowledge Finish Configuration
package.The wiki said that the ID of this package was 3, but I imitated Mineplayer and sent the package with ID 2, and the result was successful.
The server sent me a lot of data, but…