Skip to main content

steel_protocol/packets/game/
s_accept_teleportation.rs

1//! Serverbound accept teleportation packet - sent by client to acknowledge a teleport.
2
3use steel_macros::{ReadFrom, ServerPacket};
4
5/// Sent by the client to acknowledge a server-initiated teleport.
6///
7/// The client sends this after receiving a `CPlayerPosition` packet.
8/// The teleport ID must match the one from the `CPlayerPosition` packet.
9#[derive(ReadFrom, ServerPacket, Clone, Debug)]
10pub struct SAcceptTeleportation {
11    /// The teleport ID from the `CPlayerPosition` packet being acknowledged.
12    #[read(as = VarInt)]
13    pub teleport_id: i32,
14}