aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2023-03-14 16:33:03 -0500
committerGitHub <noreply@github.com>2023-03-14 16:33:03 -0500
commit12a9c8ce65b58f0c600fd7b9fc5d454ce228b420 (patch)
tree9bada4164ea12fa533d413c0c7090f4779b519f1 /azalea-protocol/src/packets/game/clientbound_player_position_packet.rs
parentb792e21d1c2b7dba04d88dba479ed451104a6514 (diff)
downloadazalea-drasl-12a9c8ce65b58f0c600fd7b9fc5d454ce228b420.tar.xz
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
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_player_position_packet.rs')
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_player_position_packet.rs19
1 files changed, 8 insertions, 11 deletions
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<Self, BufReadError> {
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 {