An open API service indexing awesome lists of open source software.

https://github.com/bedrocksharp/bedrock-protocol

An C# implementation of the Minecraft: Bedrock Edition network protocol.
https://github.com/bedrocksharp/bedrock-protocol

bedrock csharp dotnet mcpe nuget protocol

Last synced: about 2 months ago
JSON representation

An C# implementation of the Minecraft: Bedrock Edition network protocol.

Awesome Lists containing this project

README

          


bedrock-protocol


A C# implementation of the Minecraft: Bedrock Edition network protocol.


.NET 9.0
License MIT
Build Status
PRs Welcome

**bedrock-protocol** is an C# implementation of the Minecraft: Bedrock Edition network protocol. It is built on top of [raknet-cs](https://github.com/BedrockSharp/raknet-cs) for robust RakNet networking.

---

## 🛠️ Getting Started

### Installation
Clone the repository and build the project:
```bash
git clone https://github.com/BedrockSharp/bedrock-protocol.git
cd bedrock-protocol
dotnet build
```

## 📦 Defining Custom Packets

Use the attribute-based system to register your packets effortlessly:

```csharp
public class ExamplePacket : Packet
{
public override uint PacketId => (uint)PacketIds.ExamplePacket;

public string Message { get; set; } = string.Empty;

public override void Encode(BinaryStream stream)
{
stream.WriteString(Message);
}

public override void Decode(BinaryStream stream)
{
Message = stream.ReadString();
}
}
```

## 🤝 Contributing

Contributions are what make the open-source community such an amazing place!
1. **Fork** the project.
2. **Create** your Feature Branch (`git checkout -b feature/AmazingFeature`).
3. **Commit** your changes (`git commit -m 'Add some AmazingFeature'`).
4. **Push** to the Branch (`git push origin feature/AmazingFeature`).
5. **Open** a Pull Request.

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## 📄 License

Distributed under the MIT License. See [LICENSE](LICENSE) for more information.

---


Maintained with ❤️ by the BedrockSharp team.