finds.dev← search

// the find

ammaraskar/pyCraft

★ 844 · Python · NOASSERTION · updated Feb 2024

Minecraft-client networking library in Python

pyCraft is a Python library for connecting to Minecraft servers as a headless client, handling authentication, encryption, and packet serialization/deserialization. It's aimed at bot authors, automation tooling, and anyone who needs to programmatically interact with a Minecraft server without running the full game client.

- Good version coverage from 1.8 through 1.18 with explicit protocol version mappings, which matters a lot for compatibility with servers running older versions

- Packet architecture is clean and extensible — adding new packet types follows a clear pattern under minecraft/networking/packets, making it straightforward to implement missing packets

- Test suite is solid with a fake_server.py for integration-style tests, plus separate unit tests for serialization, encryption, and connection reactors

- Handles the annoying parts of the Minecraft protocol correctly: online-mode authentication via Mojang/Microsoft flow, AES/CFB8 encryption, and NBT parsing

- Stuck at 1.18.1 — last commit was early 2024 but Minecraft is now on 1.21+, meaning it's useless for modern servers running anything past 1.18 without significant porting work

- Only a subset of play-state packets are implemented; things like inventory, entities, and world data are either missing or partially decoded, so you can stay connected and chat but not much else without writing your own packet classes

- Still references Python 3.5/3.6 as supported versions and uses the `requests` library synchronously, meaning no async support — this will hurt anyone trying to manage multiple concurrent bot connections

- Microsoft auth migration happened years ago and the README still mentions Mojang authentication without clearly documenting whether Microsoft accounts are supported, which is the only kind that works now

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →