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