From 85f7ab041ac2decea5f10137d1900ea93322d586 Mon Sep 17 00:00:00 2001 From: Edvin Bryntesson Date: Fri, 23 Aug 2024 11:51:12 +0200 Subject: [PATCH] add clientbound packet: CSetContainerProperty --- .../client/play/c_set_container_property.rs | 19 +++++++++++++++++++ pumpkin-protocol/src/client/play/mod.rs | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 pumpkin-protocol/src/client/play/c_set_container_property.rs diff --git a/pumpkin-protocol/src/client/play/c_set_container_property.rs b/pumpkin-protocol/src/client/play/c_set_container_property.rs new file mode 100644 index 000000000..fd54753fe --- /dev/null +++ b/pumpkin-protocol/src/client/play/c_set_container_property.rs @@ -0,0 +1,19 @@ +use serde::Serialize; +use pumpkin_macros::packet; +#[derive(Serialize)] +#[packet(0x14)] +pub struct CSetContainerProperty { + window_id: u8, + property: i16, + value: i16 +} + +impl CSetContainerProperty { + pub const fn new(window_id: u8, property: i16, value:i16) -> Self { + Self { + window_id, + property, + value + } + } +} diff --git a/pumpkin-protocol/src/client/play/mod.rs b/pumpkin-protocol/src/client/play/mod.rs index 65a5ba8d0..838c79272 100644 --- a/pumpkin-protocol/src/client/play/mod.rs +++ b/pumpkin-protocol/src/client/play/mod.rs @@ -37,6 +37,7 @@ mod c_update_entity_rot; mod c_worldevent; mod player_action; mod c_close_container; +mod c_set_container_property; pub use c_acknowledge_block::*; pub use c_actionbar::*; @@ -76,4 +77,5 @@ pub use c_update_entity_pos::*; pub use c_update_entity_rot::*; pub use c_worldevent::*; pub use player_action::*; -pub use c_close_container::*; \ No newline at end of file +pub use c_close_container::*; +pub use c_set_container_property::*; \ No newline at end of file