Pumpkin/pumpkin-protocol/src/client/play/update_entity_pos.rs
Alexander Medvedev 466d4380cf Some Refactors
2025-02-01 17:53:41 +01:00

25 lines
547 B
Rust

use pumpkin_data::packet::clientbound::PLAY_MOVE_ENTITY_POS;
use pumpkin_macros::client_packet;
use pumpkin_util::math::vector3::Vector3;
use serde::Serialize;
use crate::VarInt;
#[derive(Serialize)]
#[client_packet(PLAY_MOVE_ENTITY_POS)]
pub struct CUpdateEntityPos {
entity_id: VarInt,
delta: Vector3<i16>,
on_ground: bool,
}
impl CUpdateEntityPos {
pub fn new(entity_id: VarInt, delta: Vector3<i16>, on_ground: bool) -> Self {
Self {
entity_id,
delta,
on_ground,
}
}
}