azalea_protocol/packets/game/
c_level_chunk_with_light.rs1use std::sync::Arc;
2
3use azalea_buf::AzBuf;
4use azalea_protocol_macros::ClientboundGamePacket;
5use azalea_registry::builtin::BlockEntityKind;
6use azalea_world::heightmap::HeightmapKind;
7use simdnbt::owned::Nbt;
8
9use super::c_light_update::ClientboundLightUpdatePacketData;
10
11#[derive(Clone, Debug, AzBuf, PartialEq, ClientboundGamePacket)]
12pub struct ClientboundLevelChunkWithLight {
13 pub x: i32,
15 pub z: i32,
16 pub chunk_data: ClientboundLevelChunkPacketData,
17 pub light_data: ClientboundLightUpdatePacketData,
18}
19
20#[derive(Clone, Debug, AzBuf, PartialEq)]
21pub struct ClientboundLevelChunkPacketData {
22 pub heightmaps: Vec<(HeightmapKind, Box<[u64]>)>,
23 pub data: Arc<Box<[u8]>>,
31 pub block_entities: Vec<BlockEntity>,
32}
33
34#[derive(Clone, Debug, AzBuf, PartialEq)]
35pub struct BlockEntity {
36 pub packed_xz: u8,
37 pub y: u16,
38 pub kind: BlockEntityKind,
39 pub data: Nbt,
40}