aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs2
-rw-r--r--azalea-protocol/src/packets/game/mod.rs6
-rw-r--r--azalea-protocol/src/packets/status/serverbound_status_request_packet.rs21
3 files changed, 7 insertions, 22 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs
index 402923c9..f4f528cf 100644
--- a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs
@@ -21,7 +21,6 @@ pub struct PlayerAbilitiesFlags {
pub instant_break: bool,
}
-// Difficulty
#[async_trait]
impl McBufReadable for PlayerAbilitiesFlags {
async fn read_into<R>(buf: &mut R) -> Result<Self, String>
@@ -38,7 +37,6 @@ impl McBufReadable for PlayerAbilitiesFlags {
}
}
-// Difficulty
impl McBufWritable for PlayerAbilitiesFlags {
fn write_into(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error> {
let mut byte = 0;
diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs
index 38630a0e..e150606c 100644
--- 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_login_packet;
pub mod clientbound_player_abilities_packet;
+pub mod clientbound_set_carried_item_packet;
+pub mod clientbound_update_tags_packet;
pub mod clientbound_update_view_distance_packet;
use packet_macros::declare_state_packets;
@@ -16,6 +18,8 @@ declare_state_packets!(
0x18: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket,
0x26: clientbound_login_packet::ClientboundLoginPacket,
0x32: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
- 0x4a: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket
+ 0x48: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
+ 0x4a: clientbound_update_view_distance_packet::ClientboundUpdateViewDistancePacket,
+ 0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket
}
);
diff --git a/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs b/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs
index af98f7cb..e77687ec 100644
--- a/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs
+++ b/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs
@@ -1,22 +1,5 @@
+use packet_macros::StatusPacket;
use std::hash::Hash;
-use super::StatusPacket;
-
-#[derive(Hash, Clone, Debug)]
+#[derive(Clone, Debug, StatusPacket)]
pub struct ServerboundStatusRequestPacket {}
-
-impl ServerboundStatusRequestPacket {
- pub fn get(self) -> StatusPacket {
- StatusPacket::ServerboundStatusRequestPacket(self)
- }
-
- pub fn write(&self, _buf: &mut Vec<u8>) -> Result<(), std::io::Error> {
- panic!("ServerboundStatusRequestPacket::write not implemented")
- }
-
- pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>(
- _buf: &mut T,
- ) -> Result<StatusPacket, String> {
- Err("ServerboundStatusRequestPacket::read not implemented".to_string())
- }
-}