Pumpkin/pumpkin-protocol/src/bedrock/client/set_actor_motion.rs
2026-05-25 11:53:37 +02:00

24 lines
533 B
Rust

use pumpkin_macros::packet;
use pumpkin_util::math::vector3::Vector3;
use crate::{codec::var_ulong::VarULong, serial::PacketWrite};
#[derive(PacketWrite)]
#[packet(40)]
pub struct CSetActorMotion {
pub target_runtime_id: VarULong,
pub motion: Vector3<f32>,
pub tick: VarULong,
}
impl CSetActorMotion {
#[must_use]
pub const fn new(target_runtime_id: VarULong, motion: Vector3<f32>, tick: VarULong) -> Self {
Self {
target_runtime_id,
motion,
tick,
}
}
}