Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
suprohub committed Feb 24, 2025
1 parent fa5716d commit 1a2201f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion pumpkin-protocol/src/client/play/damage_event.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use pumpkin_data::packet::clientbound::PLAY_DAMAGE_EVENT;
use pumpkin_macros::packet;
use pumpkin_util::math::pos::BlockPos;
use pumpkin_util::math::vec3::Vec3;
use serde::Serialize;

Expand Down
4 changes: 2 additions & 2 deletions pumpkin-protocol/src/client/play/entity_velocity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub struct CEntityVelocity<'a> {
velocity: Vec3<i16>,
}

impl CEntityVelocity {
pub fn new(entity_id: VarInt, velocity_x: f64, velocity_y: f64, velocity_z: f64) -> Self {
impl<'a> CEntityVelocity<'a> {
pub fn new(entity_id: &'a VarInt, velocity_x: f64, velocity_y: f64, velocity_z: f64) -> Self {
Self {
entity_id,
velocity: Vec3::new(
Expand Down
8 changes: 4 additions & 4 deletions pumpkin-protocol/src/client/play/player_position.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use pumpkin_util::math::vec3::Vec3;
#[packet(PLAY_PLAYER_POSITION)]
pub struct CPlayerPosition<'a> {
pub teleport_id: VarInt,
pub position: Vector3<f64>,
pub delta: Vector3<f64>,
pub position: Vec3<f64>,
pub delta: Vec3<f64>,
pub yaw: f32,
pub pitch: f32,
pub releatives: &'a [PositionFlag],
Expand Down Expand Up @@ -40,8 +40,8 @@ impl ServerPacket for CPlayerPosition<'_> {
fn read(bytebuf: &mut impl bytes::Buf) -> Result<Self, crate::bytebuf::ReadingError> {
fn get_vec(
bytebuf: &mut impl bytes::Buf,
) -> Result<Vector3<f64>, crate::bytebuf::ReadingError> {
Ok(Vector3::new(
) -> Result<Vec3<f64>, crate::bytebuf::ReadingError> {
Ok(Vec3::new(
bytebuf.try_get_f64()?,
bytebuf.try_get_f64()?,
bytebuf.try_get_f64()?,
Expand Down

0 comments on commit 1a2201f

Please # to comment.