Welcome to the CakeMC Packet Constructor! This project provides a flexible and efficient system for handling packet encoding and decoding with custom packet formats, making it easy to build and manage network packets for your applications.
- Dynamic Packet Handling: Supports multiple packet types with dynamically defined fields.
- Custom Format: Easy-to-use, compact custom format for defining packet structures.
- Builder Pattern: Construct packets with a simple and fluent builder API.
- Automatic Response Handling: Every packet automatically includes a
responseId. - Type Safety: Ensures proper type validation when constructing packets.
- Supports Multiple Data Types: Works with various primitive types (
int,short,byte,long,float,double,boolean,char,String).
The CakeMC Packet Constructor uses a custom packet format defined by a compact and flexible text-based structure. The system enables easy packet creation, encoding, and decoding. Here's how it works:
- Define Packet Structure: Packet types and their fields are defined in a custom format.
- Build Packet: Use the
PacketBuilderAPI to create packets by specifying field values. - Encode and Decode: The packet is then encoded into a byte array for transmission and decoded back to its original structure.