ArkMirage.BedrockProtocol 1.26.51-v2193.fix1

This is a prerelease version of ArkMirage.BedrockProtocol.
dotnet add package ArkMirage.BedrockProtocol --version 1.26.51-v2193.fix1
                    
NuGet\Install-Package ArkMirage.BedrockProtocol -Version 1.26.51-v2193.fix1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ArkMirage.BedrockProtocol" Version="1.26.51-v2193.fix1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArkMirage.BedrockProtocol" Version="1.26.51-v2193.fix1" />
                    
Directory.Packages.props
<PackageReference Include="ArkMirage.BedrockProtocol" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ArkMirage.BedrockProtocol --version 1.26.51-v2193.fix1
                    
#r "nuget: ArkMirage.BedrockProtocol, 1.26.51-v2193.fix1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ArkMirage.BedrockProtocol@1.26.51-v2193.fix1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ArkMirage.BedrockProtocol&version=1.26.51-v2193.fix1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ArkMirage.BedrockProtocol&version=1.26.51-v2193.fix1&prerelease
                    
Install as a Cake Tool

BedrockProtocol

License: MPL 2.0 .NET

中文

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 — PacketRegistry maps packet IDs ↔ types with plain dictionaries, no reflection
  • Generated code — codecs are generated by Protocol.Gen from protocol definitions
  • Zero-dependency binary IO — span-backed MemoryStreamReader / MemoryStreamWriter and VarInt helpers
  • Faithful protocol modeling — OneOf<...> discriminated unions and Optional<T> mirror the protocol's variant and optional fields

Installation

Requirements

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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