Skip to content

Minecraft client to connect to a Minecraft server through a high-level Go API, uses `go-mclib/protocol` under the hood

License

Notifications You must be signed in to change notification settings

go-mclib/client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-mclib/client

A higher-level framework for building Minecraft (chat)bots with Go.

Capabilities / TODO

The bot is NOT ready for complex tasks yet. In its current state, it can join a server, remain online and chat. It can also listen and send any packet, but there are no "smart" features yet. Here's the full list:

  • Connecting to offline/online mode servers and remaining online (keep-alive);
  • Reading and sending chat packets & signed chat messages;
  • Sending simple packets (drop held item, look at specific coordinates, etc...);
  • Knowledge about its own health, experience, automatic respawning;
  • Knowledge about the world/chunk data, so that blocks can be placed/broken/interacted with;
  • Inventory/GUI management (move items in inventory, take/store items in containers, crafting...);
  • Knowledge about entities in chunks around the bot, so that they can be attacked/interacted with;
  • Knowledge about block shapes
    • Movement;
    • Gravity
  • Smart movement using an algo (A*?);

Disclaimer

This project is a work in progress. It was made to learn more about the Minecraft protocol, and also because there isn't really a good framework for building bots with Go.

Since the tears and sweat are real, it is unlikely that I will continue maintaining this before taking a break from it.

Dependencies

Usage

See the examples directory for some sample bots/inspiration.

For example, to run the paintball example:

go run examples/paintball/paintball.go -s <your_server_ip> -u "<username (omit this parameter for Microsoft auth)>"

License

This project is licensed under the MIT License - see the LICENSE file for details.