aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-24 23:54:31 -0500
committermat <github@matdoes.dev>2022-06-24 23:54:31 -0500
commit41f61bf9c11ab58af4c1bd97c2cb40110b272449 (patch)
tree3784907c2c18ce9881907a9e2603218d26fcf973 /azalea-protocol/src
parentb030b0ea330c674415f7e30634957167b2fa6a6d (diff)
downloadazalea-drasl-41f61bf9c11ab58af4c1bd97c2cb40110b272449.tar.xz
i hate mutexes
Diffstat (limited to 'azalea-protocol/src')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_player_position_packet.rs2
-rwxr-xr-xazalea-protocol/src/packets/game/mod.rs2
-rw-r--r--azalea-protocol/src/packets/game/serverbound_accept_teleportation_packet.rs8
3 files changed, 11 insertions, 1 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 2c5504fa..29f7c1a3 100644
--- a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs
+++ b/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs
@@ -14,7 +14,7 @@ pub struct ClientboundPlayerPositionPacket {
/// Client should confirm this packet with Teleport Confirm containing the
/// same Teleport ID.
#[var]
- pub id: i32,
+ pub id: u32,
pub dismount_vehicle: bool,
}
diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs
index d3d6650c..3e492dec 100755
--- a/azalea-protocol/src/packets/game/mod.rs
+++ b/azalea-protocol/src/packets/game/mod.rs
@@ -49,6 +49,7 @@ pub mod clientbound_update_attributes_packet;
pub mod clientbound_update_recipes_packet;
pub mod clientbound_update_tags_packet;
pub mod clientbound_update_view_distance_packet;
+pub mod serverbound_accept_teleportation_packet;
pub mod serverbound_chat_command_packet;
pub mod serverbound_chat_preview_packet;
pub mod serverbound_custom_payload_packet;
@@ -63,6 +64,7 @@ use packet_macros::declare_state_packets;
declare_state_packets!(
GamePacket,
Serverbound => {
+ 0x00: serverbound_accept_teleportation_packet::ServerboundAcceptTeleportationPacket,
0x03: serverbound_chat_command_packet::ServerboundChatCommandPacket,
0x05: serverbound_chat_preview_packet::ServerboundChatPreviewPacket,
0x0c: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket,
diff --git a/azalea-protocol/src/packets/game/serverbound_accept_teleportation_packet.rs b/azalea-protocol/src/packets/game/serverbound_accept_teleportation_packet.rs
new file mode 100644
index 00000000..98a9f728
--- /dev/null
+++ b/azalea-protocol/src/packets/game/serverbound_accept_teleportation_packet.rs
@@ -0,0 +1,8 @@
+use azalea_buf::McBuf;
+use packet_macros::GamePacket;
+
+#[derive(Clone, Debug, McBuf, GamePacket)]
+pub struct ServerboundAcceptTeleportationPacket {
+ #[var]
+ pub id: u32,
+}