From c10b732510868819a652b76e31278906914d699d Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 7 May 2022 18:26:19 -0500 Subject: improve data generator and add packet --- .../packets/game/clientbound_container_set_content_packet.rs | 11 +++++++++++ azalea-protocol/src/packets/game/mod.rs | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs b/azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs new file mode 100644 index 00000000..e46f5af1 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs @@ -0,0 +1,11 @@ +use azalea_core::Slot; +use packet_macros::GamePacket; + +#[derive(Clone, Debug, GamePacket)] +pub struct ClientboundContainerSetContentPacket { + pub container_id: u8, + #[var] + pub state_id: i32, + pub items: Vec, + pub carried_item: Slot, +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 99cafe56..d112f576 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -2,6 +2,7 @@ pub mod clientbound_add_entity_packet; pub mod clientbound_add_mob_packet; pub mod clientbound_add_player_packet; pub mod clientbound_change_difficulty_packet; +pub mod clientbound_container_set_content_packet; pub mod clientbound_custom_payload_packet; pub mod clientbound_declare_commands_packet; pub mod clientbound_disconnect_packet; @@ -40,6 +41,7 @@ declare_state_packets!( 0x04: clientbound_add_player_packet::ClientboundAddPlayerPacket, 0x0e: clientbound_change_difficulty_packet::ClientboundChangeDifficultyPacket, 0x12: clientbound_declare_commands_packet::ClientboundDeclareCommandsPacket, + 0x14: clientbound_container_set_content_packet::ClientboundContainerSetContentPacket, 0x1a: clientbound_disconnect_packet::ClientboundDisconnectPacket, 0x1b: clientbound_entity_event_packet::ClientboundEntityEventPacket, 0x18: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket, -- cgit v1.2.3