valence_protocol/packets/play/custom_payload_c2s.rs
1use std::borrow::Cow;
2
3use valence_ident::Ident;
4
5use crate::{Bounded, Decode, Encode, Packet, RawBytes};
6
7pub const MAX_PAYLOAD_SIZE: usize = 32767;
8
9#[derive(Clone, Debug, Encode, Decode, Packet)]
10pub struct CustomPayloadC2s<'a> {
11 pub channel: Ident<Cow<'a, str>>,
12 pub data: Bounded<RawBytes<'a>, MAX_PAYLOAD_SIZE>,
13}