Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

EndstoneMC/bedrock-protocol

Open more actions menu

Repository files navigation

bedrock-protocol

A protoc-style codegen for Minecraft Bedrock wire packets. Schemas are written in Python (read statically, never executed) and rendered to C++ through Jinja templates. CMake integration mirrors protobuf_generate.

Status: active design. Interfaces are subject to change.

Schema

A packet file is plain Python:

@packet(id=5)
class DisconnectPacket:
    reason: DisconnectFailReason = field(type=varint32, since=622)
    messages: DisconnectPacketMessages | None = field(type=Union)

See protocol/disconnect.py for the current state, and tests/ for usage examples.

Build

cmake -S . -B build
cmake --build build

The build invokes the codegen on files under protocol/ and links the generated headers into libbedrock_protocol.

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.