ArkMirage.BedrockProtocol
1.26.51-v2193.fix1
dotnet add package ArkMirage.BedrockProtocol --version 1.26.51-v2193.fix1
NuGet\Install-Package ArkMirage.BedrockProtocol -Version 1.26.51-v2193.fix1
<PackageReference Include="ArkMirage.BedrockProtocol" Version="1.26.51-v2193.fix1" />
<PackageVersion Include="ArkMirage.BedrockProtocol" Version="1.26.51-v2193.fix1" />
<PackageReference Include="ArkMirage.BedrockProtocol" />
paket add ArkMirage.BedrockProtocol --version 1.26.51-v2193.fix1
#r "nuget: ArkMirage.BedrockProtocol, 1.26.51-v2193.fix1"
#:package ArkMirage.BedrockProtocol@1.26.51-v2193.fix1
#addin nuget:?package=ArkMirage.BedrockProtocol&version=1.26.51-v2193.fix1&prerelease
#tool nuget:?package=ArkMirage.BedrockProtocol&version=1.26.51-v2193.fix1&prerelease
BedrockProtocol
A pure C# implementation of the Minecraft Bedrock Edition network protocol, targeting .NET 10. It ships strongly-typed, ready-to-use codecs for every packet in the protocol — build servers, clients, proxies, and tools without hand-writing serialization code.
Targets Bedrock protocol version 2193 (see ProtocolVersion.VERSION).
Pairs naturally with our pure C# RakNet implementation, which handles the reliable UDP transport layer underneath the Bedrock protocol.
Features
- 230+ packet codecs — every registered packet gets a strongly-typed C# class implementing
Read/Write - AOT-friendly registry —
PacketRegistrymaps packet IDs ↔ types with plain dictionaries, no reflection - Generated code — codecs are generated by
Protocol.Genfrom protocol definitions - Zero-dependency binary IO — span-backed
MemoryStreamReader/MemoryStreamWriterand VarInt helpers - Faithful protocol modeling —
OneOf<...>discriminated unions andOptional<T>mirror the protocol's variant and optional fields
Installation
Requirements
- .NET 10.0 SDK or later
Add to your project
dotnet add package ArkMirage.BedrockProtocol
Or add a project reference:
<ItemGroup>
<ProjectReference Include="path/to/Protocol.csproj" />
</ItemGroup>
Quick Start
Decode an incoming packet
using Protocol.Packets;
// packetId comes from your transport layer (e.g. a RakNet frame payload)
IPacket packet = PacketRegistry.CreatePacket(packetId);
packet.Decode(rawBytes);
if (packet is TextPacket chat)
{
// Strongly-typed access to every field
}
Build and encode an outgoing packet
using Protocol.Packets;
var outgoing = new TextPacket
{
// ...set properties...
};
ReadOnlyMemory<byte> bytes = outgoing.Encode();
Project Structure
| Path | Description |
|---|---|
Codec/IPacket.cs |
Packet base class — handles the unsigned-varint ID prefix, Encode / Decode, and byte caching |
Codec/PacketRegistry.cs |
Static registry mapping packet IDs ↔ types, plus factory methods |
Codec/MinecraftPacketIds.cs |
Enum of all packet IDs |
Codec/Packet/ |
One codec per packet (LoginPacket, TextPacket, MovePlayerPacket, ...) |
Codec/Nbt/ |
NBT (Named Binary Tag) codec |
Utility/ |
Binary IO (MemoryStreamReader / MemoryStreamWriter), VarInt, OneOf, Optional<T>, etc. |
License
This project is licensed under the Mozilla Public License 2.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.26.51-v2193.fix1 | 41 | 9/26/2026 |
| 1.26.45-v2169 | 81 | 8/25/2026 |
| 1.26.44-v2168 | 65 | 8/25/2026 |
| 1.26.40-v2168 | 79 | 8/25/2026 |