From a4c63c7bb4e4540bc47b3fd91ff08908de139494 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Apr 2022 23:48:53 -0500 Subject: create the necessary structs --- .../game/clientbound_level_chunk_with_light_packet.rs | 12 ++++++++++++ .../src/packets/game/clientbound_light_update_packet.rs | 11 +++++++++++ azalea-protocol/src/packets/game/mod.rs | 4 ++++ 3 files changed, 27 insertions(+) create mode 100644 azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs create mode 100644 azalea-protocol/src/packets/game/clientbound_light_update_packet.rs (limited to 'azalea-protocol') diff --git a/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs b/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs new file mode 100644 index 00000000..b6632f86 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs @@ -0,0 +1,12 @@ +use azalea_core::{game_type::GameType, resource_location::ResourceLocation}; +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundLevelChunkWithLightPacket { + pub x: i32, + pub z: i32, + pub chunk_data: ClientboundLevelChunkPacketData, + pub light_data: ClientboundLightUpdatePacketData, +} + +struct ClientboundLevelChunkPacketData {} diff --git a/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs b/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs new file mode 100644 index 00000000..43d530e0 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs @@ -0,0 +1,11 @@ +use azalea_core::{game_type::GameType, resource_location::ResourceLocation}; +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundLightUpdatePacket { + pub x: i32, + pub z: i32, + pub light_data: ClientboundLightUpdatePacketData, +} + +pub struct ClientboundLightUpdatePacketData {} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index db799dba..d957627e 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -3,6 +3,8 @@ pub mod clientbound_custom_payload_packet; pub mod clientbound_declare_commands_packet; pub mod clientbound_disconnect_packet; pub mod clientbound_entity_event_packet; +pub mod clientbound_level_chunk_with_light_packet; +pub mod clientbound_light_update_packet; pub mod clientbound_login_packet; pub mod clientbound_player_abilities_packet; pub mod clientbound_player_info_packet; @@ -25,6 +27,8 @@ declare_state_packets!( 0x1a: clientbound_disconnect_packet::ClientboundDisconnectPacket, 0x1b: clientbound_entity_event_packet::ClientboundEntityEventPacket, 0x18: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket, + 0x22: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket, + 0x25: clientbound_light_update_packet::ClientboundLightUpdatePacket, 0x26: clientbound_login_packet::ClientboundLoginPacket, 0x32: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket, 0x36: clientbound_player_info_packet::ClientboundPlayerInfoPacket, -- cgit v1.2.3