diff options
| author | mat <github@matdoes.dev> | 2022-05-07 18:26:19 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-07 18:26:19 -0500 |
| commit | c10b732510868819a652b76e31278906914d699d (patch) | |
| tree | 3c1039ec3d200bc16ead375bc0f418194ca68d19 /azalea-protocol/src | |
| parent | aa3ba64aa45abcafb6aa9c1981730d3270a3b0a5 (diff) | |
| download | azalea-drasl-c10b732510868819a652b76e31278906914d699d.tar.xz | |
improve data generator and add packet
Diffstat (limited to 'azalea-protocol/src')
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs | 11 | ||||
| -rwxr-xr-x | azalea-protocol/src/packets/game/mod.rs | 2 |
2 files changed, 13 insertions, 0 deletions
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<Slot>, + 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, |
