From 12a9c8ce65b58f0c600fd7b9fc5d454ce228b420 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 14 Mar 2023 16:33:03 -0500 Subject: 1.19.4 (#57) * 23w03a * 23w04a * 23w05a * 23w06a * fix * 23w07a mojang broke their json data generator so some stuff is missing * didn't mean to commit that file here * 1.19.4-pre2 * fix * 1.19.4-pre3 * fix * how did these packets get here * 1.19.4-pre4 * 1.19.4-rc1 * 1.19.4-rc2 * 1.19.4-rc3 * merge main * remove debugging code * 1.19.4 --- .../game/clientbound_player_position_packet.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'azalea-protocol/src/packets/game/clientbound_player_position_packet.rs') diff --git a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs index 3ad422e7..f59d20ac 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs @@ -1,8 +1,8 @@ -use azalea_buf::{BufReadError, McBuf}; -use azalea_buf::{McBufReadable, McBufWritable}; +use std::io::{Cursor, Write}; + +use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; use azalea_core::FixedBitSet; use azalea_protocol_macros::ClientboundGamePacket; -use std::io::{Cursor, Write}; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] pub struct ClientboundPlayerPositionPacket { @@ -11,16 +11,13 @@ pub struct ClientboundPlayerPositionPacket { pub z: f64, pub y_rot: f32, pub x_rot: f32, - pub relative_arguments: RelativeArguments, - /// Client should confirm this packet with Teleport Confirm containing the - /// same Teleport ID. + pub relative_arguments: RelativeMovements, #[var] pub id: u32, - pub dismount_vehicle: bool, } #[derive(Debug, Clone)] -pub struct RelativeArguments { +pub struct RelativeMovements { pub x: bool, pub y: bool, pub z: bool, @@ -28,10 +25,10 @@ pub struct RelativeArguments { pub x_rot: bool, } -impl McBufReadable for RelativeArguments { +impl McBufReadable for RelativeMovements { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<5>::read_from(buf)?; - Ok(RelativeArguments { + Ok(RelativeMovements { x: set.index(0), y: set.index(1), z: set.index(2), @@ -41,7 +38,7 @@ impl McBufReadable for RelativeArguments { } } -impl McBufWritable for RelativeArguments { +impl McBufWritable for RelativeMovements { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<5>::new(); if self.x { -- cgit v1.2.3