Search code examples
pythonsocketspacketminecraft

How do I send a Minecraft server packet?


OK, so I went on http://wiki.vg/Protocol, but I don't understand how to send the packets through a socket to a Minecraft server. I would like to know if it is possible, and if it is how, to send Minecraft packets through a Python socket to a Minecraft server, as if the socket was the Minecraft client. I want to see if there is a way to make a minecraft person appear on a server using python and make him walk in a straight line, for a certain amount of time (probably through a python for loop), than log out. Is there a python package that allows you to do this? Thanks!


Solution

  • Well I'd start with this which sends a packet. It's linked to from the same page you mention. Then adjust the packet ID and the data you add to the stream.