Add packet struct write
This commit is contained in:
27
protocol-generator/test/packet_struct.txt
Normal file
27
protocol-generator/test/packet_struct.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
pub struct TestPacket {
|
||||
pub boolean: bool,
|
||||
pub byte: i8,
|
||||
pub unsigned_byte: u8,
|
||||
pub short: i16,
|
||||
pub unsigned_short: u16,
|
||||
pub int: i32,
|
||||
#[packet(with = "var_int")]
|
||||
pub varint: i32,
|
||||
pub unsigned_int: u32,
|
||||
pub long: i64,
|
||||
#[packet(with = "var_long")]
|
||||
pub varlong: i64,
|
||||
pub unsigned_long: u64,
|
||||
pub float: f32,
|
||||
pub double: f64,
|
||||
#[packet(max_length = 20)]
|
||||
pub string: String,
|
||||
pub uuid: Uuid,
|
||||
#[packet(with = "uuid_hyp_str")]
|
||||
pub hyphenated: Uuid,
|
||||
pub byte_array: Vec<u8>,
|
||||
#[packet(with = "rest")]
|
||||
pub rest: Vec<u8>,
|
||||
pub compound_tag: CompoundTag,
|
||||
pub ref: Chat,
|
||||
}
|
Reference in New Issue
Block a user