Bedriox Protocol is the bounded Minecraft: Bedrock Edition wire-protocol library for Bedriox. It is an early foundation project and is not yet usable as a complete client or server.
- Binary primitives and bounded codecs.
- Packet definitions and a registry for the explicitly supported Bedrock release.
- Bedrock packet batching, compression, encryption framing, and NBT when implemented.
- Stable boundaries that do not depend on server, player, or world objects.
NetherNet transport, gameplay, authentication policy, and copyrighted game data are out of scope.
The package is not currently published on Packagist. Add the public repository as a Composer VCS repository and require bedriox/protocol, or use the sibling checkout layout documented by Bedriox.
The codec requires 64-bit PHP 8.4 through 8.x.
use Bedriox\Protocol\Codec\UnsignedVarInt;
$bytes = UnsignedVarInt::encode(128);
$decoded = UnsignedVarInt::decode($bytes);For stateful parsing without mutable cursors, use the bounded reader:
use Bedriox\Protocol\Codec\ByteBufferReader;
$reader = ByteBufferReader::fromString($networkBytes, maximumBytes: 1_048_576);
$packetId = $reader->readUnsignedVarInt();
$payloadReader = $packetId->reader; // the original reader remains unchangedSee the codebase map, packet contract, change-safety guide, packet reference, codec reference, usage guide, architecture, development, compatibility, and troubleshooting before integrating it.
The sole wire target is Minecraft 1.26.60 / protocol 2225; Minecraft 1.26.61 is qualified as a same-protocol retail client. The library provides a bounded gameplay/bootstrap subset and dataset-backed fixed-flat chunk generation. Packet names remain unversioned because upgrades replace this single current target rather than creating parallel protocol APIs. Other protocol numbers fail closed. This is not a claim of complete gameplay interoperability. Original source code is licensed under GPL-3.0-only. Required third-party legal attribution is recorded in NOTICE or THIRD_PARTY_NOTICES.md when applicable.