steel_protocol/packets/game/
c_set_passengers.rs1use steel_macros::{ClientPacket, WriteTo};
4use steel_registry::packets::play::C_SET_PASSENGERS;
5
6#[derive(ClientPacket, WriteTo, Clone, Debug)]
8#[packet_id(Play = C_SET_PASSENGERS)]
9pub struct CSetPassengers {
10 #[write(as = VarInt)]
12 pub vehicle_id: i32,
13 #[write(as = Prefixed(VarInt, inner = VarInt))]
15 pub passenger_ids: Vec<i32>,
16}
17
18impl CSetPassengers {
19 #[must_use]
21 pub const fn new(vehicle_id: i32, passenger_ids: Vec<i32>) -> Self {
22 Self {
23 vehicle_id,
24 passenger_ids,
25 }
26 }
27}