chunkedge_protocol/packets/configuration/
registry_data_s2c.rs

1use std::borrow::Cow;
2
3use chunkedge_binary::{Decode, Encode};
4use chunkedge_ident::Ident;
5use chunkedge_nbt::Compound;
6use indexmap::IndexMap;
7
8use crate::{Packet, PacketState};
9
10#[derive(Clone, Debug, Encode, Decode, Packet)]
11#[packet(state = PacketState::Configuration)]
12// After the server and the client have negotiated the required registry data,
13// the server sends this packet for each registry to the client.
14pub struct RegistryDataS2c<'a> {
15    // The id of the registry
16    pub id: Ident<Cow<'a, str>>,
17    // The id of the entries and the entry data itself
18    pub entries: IndexMap<Ident<Cow<'a, str>>, Option<Compound>>,
19}