Skip to content

BedrockSharp/bedrock-protocol

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 for robust RakNet networking.


🛠️ Getting Started

Installation

Clone the repository and build the project:

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:

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 for details.

📄 License

Distributed under the MIT License. See LICENSE for more information.


Maintained with ❤️ by the BedrockSharp team.

About

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

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages