diff options
| author | mat <git@matdoes.dev> | 2024-10-26 05:28:11 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-10-26 05:28:11 +0000 |
| commit | b762575db61cf775d603e11eb2bd27ae13bdc4e9 (patch) | |
| tree | 8fa4c5f3d127e420c8a50d4e4b02b5563a6322b2 /azalea-protocol/src/packets | |
| parent | a3cf78ebec19dd468ddd3d7090bb521d6326099c (diff) | |
| download | azalea-drasl-b762575db61cf775d603e11eb2bd27ae13bdc4e9.tar.xz | |
fix ClientboundPlayerInfoUpdatePacket and replace GameProfile with LoginFinished in an example
Diffstat (limited to 'azalea-protocol/src/packets')
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs index d334d783..2024f082 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs @@ -174,7 +174,7 @@ pub struct ActionEnumSet { impl McBufReadable for ActionEnumSet { fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { - let set = FixedBitSet::<6>::read_from(buf)?; + let set = FixedBitSet::<7>::read_from(buf)?; Ok(ActionEnumSet { add_player: set.index(0), initialize_chat: set.index(1), @@ -189,7 +189,7 @@ impl McBufReadable for ActionEnumSet { impl McBufWritable for ActionEnumSet { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - let mut set = FixedBitSet::<6>::new(); + let mut set = FixedBitSet::<7>::new(); if self.add_player { set.set(0); } @@ -208,6 +208,9 @@ impl McBufWritable for ActionEnumSet { if self.update_display_name { set.set(5); } + if self.update_list_order { + set.set(6); + } set.write_into(buf)?; Ok(()) } |
