asyncio-driven headless client library for block game
Find a file
2023-11-20 19:25:50 +01:00
.github/workflows Only run CI/CD on main branch 2022-05-15 13:28:56 +02:00
aiocraft feat: harder, better, faster, stronger 2023-11-20 17:36:03 +01:00
compiler feat: harder, better, faster, stronger 2023-11-20 17:36:03 +01:00
examples fix: remove example which doesn't apply anymore 2023-11-20 17:50:38 +01:00
src chore: harder, better, faster, stronger 2023-11-02 05:42:42 +01:00
.editorconfig style: tabs, 2 for rs, 4 for py 2022-07-06 12:41:40 +02:00
.gitignore fix: gitignore built wheel files 2022-05-27 10:50:32 +02:00
Cargo.toml docs: updated README, bumped version 2023-11-20 17:57:33 +01:00
LICENSE Initial commit 2021-09-30 17:05:54 +02:00
pyproject.toml docs: updated README, bumped version 2023-11-20 17:57:33 +01:00
README.md docs: wording, consistency 2023-11-20 19:25:50 +01:00

aiocraft

an asyncio-driven headless client library for block game with packet definitions

aiocraft is a collection of types, definitions and utils to build minecraft clients without the official Java implementation

it is built on top of PrismarineJS/minecraft-data, which contains definitions for all types across all versions

aiocraft provides a raw implementation of a client but it isn't ready to be used, if you're looking for a convenient client library take a look at Treepuncher

Packets

the whole Minecraft protocol from 0.30c to 1.19.3 is compiled and available feature flags to only include certain protocol versions are planned all types and packets are instantiable and serializable on all supported protocols:

from aiocraft.proto import PacketArmAnimation
a_packet = PacketArmAnimation(hand=0)
await client.dispatcher.write(a_packet)

Client

an abstract client implementation is provided, but it's supposed to be extended (like in Treepuncher) the abstract client implements flows for all game phases and both a .join() or a .info() method to easily start the login flow

Types

aiocraft defines these minecraft types:

  • Dimension
  • Difficulty
  • Gamemode
  • GameProfile
  • Enchantment
  • BlockPos
  • Item (without constants)
  • Texture
  • Player

more types are planned but still not generated:

  • Entity
  • Block
  • Item (with constants)

World

a chunk parser is provided with native code (Rust + PyO3). It is pretty fast but the abstract client doesn't make use of it