Python
Install
Install the Linux or Windows wheel for Python 3.12 or newer from PyPI:
uv pip install bedrock-protocol
Or build it from a checkout with CMake and a C++23 compiler:
git clone https://github.com/EndstoneMC/bedrock-protocol
uv pip install ./bedrock-protocol
Encode and decode
import bedrock_protocol as bp
packet = bp.TextPacket()
packet.body = bp.TextPacket.MessageOnly(type=bp.TextPacketType.CHAT, message="hello")
data = bp.encode(packet)
decoded = bp.decode(bp.TextPacket, data)
assert decoded == packet
Pick a protocol
version = bp.ProtocolVersion.get(2193)
assert version is not None and version.name == "1.26.50"
pinned = bp.v2193.encode(packet)
picked = bp.v2193.decode(bp.TextPacket, pinned)
assert picked == packet
C++
Install
Unpack a package from the releases and point CMAKE_PREFIX_PATH at its folder:
find_package(bedrock-protocol CONFIG REQUIRED)
target_link_libraries(my_target PRIVATE bedrock::protocol)
Encode and decode
#include <cassert>
#include <bedrock/protocol.hpp>
namespace bp = bedrock::protocol;
bp::TextPacket packet;
packet.body = bp::TextPacket::MessageOnly{.type = bp::TextPacketType::Chat, .message = "hello"};
std::expected<std::string, bp::EncodeError> data = bp::encode(packet);
assert(data);
std::expected<bp::TextPacket, bp::DecodeError> decoded = bp::decode<bp::TextPacket>(*data);
assert(decoded && *decoded == packet);
Pick a protocol
std::optional<bp::ProtocolVersion> version = bp::ProtocolVersion::get(2193);
assert(version && version->getName() == "1.26.50");
std::expected<std::string, bp::EncodeError> pinned = bp::v2193::encode(packet);
assert(pinned);
std::expected<bp::TextPacket, bp::DecodeError> picked = bp::v2193::decode<bp::TextPacket>(*pinned);
assert(picked && *picked == packet);
Java
Install
Add the package from Maven Central to a Gradle build:
dependencies {
implementation("dev.endstone:bedrock-protocol:X.Y.Z")
}
Or build it from a checkout with JDK 21 and Python 3.12 or newer into the local Maven repository:
git clone https://github.com/EndstoneMC/bedrock-protocol
cd bedrock-protocol/java
./gradlew publishToMavenLocal
Encode and decode
import dev.endstone.protocol.Protocol;
import dev.endstone.protocol.TextPacket;
import dev.endstone.protocol.TextPacketType;
TextPacket packet =
TextPacket.newBuilder()
.setMessageOnly(
TextPacket.MessageOnly.newBuilder()
.setType(TextPacketType.CHAT)
.setMessage("hello")
.build())
.build();
byte[] data = Protocol.encode(packet);
TextPacket decoded = Protocol.decode(TextPacket.class, data);
assert decoded.equals(packet);
Pick a protocol
import dev.endstone.protocol.ProtocolVersion;
import java.util.Optional;
Optional<ProtocolVersion> version = ProtocolVersion.get(2193);
assert version.isPresent() && version.get().getName().equals("1.26.50");
byte[] pinned = Protocol.v2193.encode(packet);
TextPacket picked = Protocol.v2193.decode(TextPacket.class, pinned);
assert picked.equals(packet);
Supported Protocols
| Protocol | Releases |
|---|---|
| 729 | 1.21.30 to 1.21.31 |
| 748 | 1.21.40 to 1.21.44 |
| 766 | 1.21.50 to 1.21.51 |
| 776 | 1.21.60 to 1.21.62 |
| 786 | 1.21.70 to 1.21.73 |
| 800 | 1.21.80 to 1.21.84 |
| 818 | 1.21.90 to 1.21.92 |
| 819 | 1.21.93 to 1.21.95 |
| 827 | 1.21.100 to 1.21.102 |
| 844 | 1.21.111 to 1.21.114 |
| 859 | 1.21.120 to 1.21.123 |
| 860 | 1.21.124 |
| 898 | 1.21.130 to 1.21.132 |
| 924 | 1.26.0 to 1.26.3 |
| 944 | 1.26.10 to 1.26.14 |
| 975 | 1.26.20 to 1.26.23 |
| 1001 | 1.26.30 to 1.26.36 |
| 2168 | 1.26.40 to 1.26.44 |
| 2169 | 1.26.45 |
| 2193 | 1.26.50 to 1.26.52 |
| 2225 | 1.26.6x |
Building from Source
With CMake, Ninja, Python 3.12 or newer and a C++23 compiler, from a Visual Studio developer prompt on Windows:
cmake --preset release
cmake --build --preset release
cmake --install build/Release --prefix stage
uv sync
License
MIT, see LICENSE.
Metadata
Release files for bedrock-protocol 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bedrock_protocol-0.5.0.tar.gz | 265.8 kB | With provenance | Details for bedrock_protocol-0.5.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bedrock_protocol-0.5.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for bedrock_protocol-0.5.0-cp312-abi3-win_amd64.whl |
| bedrock_protocol-0.5.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details for bedrock_protocol-0.5.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
Total release size: 11.7 MB
Release files / bedrock_protocol-0.5.0.tar.gz
| Download URL | bedrock_protocol-0.5.0.tar.gz |
|---|---|
| Size | 265.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b3720b87724d9d419d20721649514abb3daebe6dad67d8cecd1d94ebc776531
|
|
BLAKE2b-256 checksum How to use checksums |
535406c6c0a721f0181245cafbb759b0eb7866f7c67afb905628d746de2a9d53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / bedrock_protocol-0.5.0-cp312-abi3-win_amd64.whl
| Download URL | bedrock_protocol-0.5.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
29fc92a5685b0f0b9a1865a16786194086cda612f7deda4ec77fbe0dac1cef06
|
|
BLAKE2b-256 checksum How to use checksums |
29e146493e3065169812ea3b228e97e78082b7bc78552dd3d64177f0fd75e1d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / bedrock_protocol-0.5.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | bedrock_protocol-0.5.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 6.6 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ad4cd935aae2195b4645056b793789c5b2835fc623847ccd108f4598dbff9fd2
|
|
BLAKE2b-256 checksum How to use checksums |
6673a3867ea336431da4a4519aeab6f3ec0895ef22050c8c1521ee9d823daf06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for bedrock-protocol 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for bedrock_protocol-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.