aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs')
-rwxr-xr-xazalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs
deleted file mode 100755
index 900d1824..00000000
--- a/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-use std::io::Cursor;
-
-use azalea_buf::{McBufReadable, McBufWritable};
-use azalea_core::bitset::FixedBitSet;
-use azalea_protocol_macros::ServerboundGamePacket;
-
-use crate::packets::BufReadError;
-
-#[derive(Clone, Debug, ServerboundGamePacket)]
-pub struct ServerboundPlayerAbilitiesPacket {
- pub is_flying: bool,
-}
-
-impl McBufReadable for ServerboundPlayerAbilitiesPacket {
- fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
- let set = FixedBitSet::<2>::read_from(buf)?;
- Ok(Self {
- is_flying: set.index(1),
- })
- }
-}
-
-impl McBufWritable for ServerboundPlayerAbilitiesPacket {
- fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> {
- let mut set = FixedBitSet::<2>::new();
- if self.is_flying {
- set.set(1);
- }
- set.write_into(buf)
- }
-}