33 lines
587 B
Rust
33 lines
587 B
Rust
use pumpkin_macros::client_packet;
|
|
use serde::Serialize;
|
|
|
|
use crate::VarInt;
|
|
|
|
#[derive(Serialize)]
|
|
#[client_packet("play:move_entity_pos")]
|
|
pub struct CUpdateEntityPos {
|
|
entity_id: VarInt,
|
|
delta_x: i16,
|
|
delta_y: i16,
|
|
delta_z: i16,
|
|
on_ground: bool,
|
|
}
|
|
|
|
impl CUpdateEntityPos {
|
|
pub fn new(
|
|
entity_id: VarInt,
|
|
delta_x: i16,
|
|
delta_y: i16,
|
|
delta_z: i16,
|
|
on_ground: bool,
|
|
) -> Self {
|
|
Self {
|
|
entity_id,
|
|
delta_x,
|
|
delta_y,
|
|
delta_z,
|
|
on_ground,
|
|
}
|
|
}
|
|
}
|