-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
246 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use pumpkin_macros::packet; | ||
use serde::Serialize; | ||
|
||
use crate::VarInt; | ||
|
||
#[derive(Serialize, Clone)] | ||
#[packet(0x48)] | ||
pub struct CHeadRot { | ||
entity_id: VarInt, | ||
head_yaw: u8, | ||
} | ||
|
||
impl CHeadRot { | ||
pub fn new(entity_id: VarInt, head_yaw: u8) -> Self { | ||
Self { | ||
entity_id, | ||
head_yaw, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
pumpkin-protocol/src/client/play/c_update_entitiy_pos_rot.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use pumpkin_macros::packet; | ||
use serde::Serialize; | ||
|
||
use crate::VarInt; | ||
|
||
#[derive(Serialize, Clone)] | ||
#[packet(0x2F)] | ||
pub struct CUpdateEntityPosRot { | ||
entity_id: VarInt, | ||
delta_x: i16, | ||
delta_y: i16, | ||
delta_z: i16, | ||
yaw: u8, | ||
pitch: u8, | ||
on_ground: bool, | ||
} | ||
|
||
impl CUpdateEntityPosRot { | ||
pub fn new( | ||
entity_id: VarInt, | ||
delta_x: i16, | ||
delta_y: i16, | ||
delta_z: i16, | ||
yaw: u8, | ||
pitch: u8, | ||
on_ground: bool, | ||
) -> Self { | ||
Self { | ||
entity_id, | ||
delta_x, | ||
delta_y, | ||
delta_z, | ||
yaw, | ||
pitch, | ||
on_ground, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use pumpkin_macros::packet; | ||
use serde::Serialize; | ||
|
||
use crate::VarInt; | ||
|
||
#[derive(Serialize, Clone)] | ||
#[packet(0x2E)] | ||
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, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use pumpkin_macros::packet; | ||
use serde::Serialize; | ||
|
||
use crate::VarInt; | ||
|
||
#[derive(Serialize, Clone)] | ||
#[packet(0x30)] | ||
pub struct CUpdateEntityRot { | ||
entity_id: VarInt, | ||
yaw: u8, | ||
pitch: u8, | ||
on_ground: bool, | ||
} | ||
|
||
impl CUpdateEntityRot { | ||
pub fn new(entity_id: VarInt, yaw: u8, pitch: u8, on_ground: bool) -> Self { | ||
Self { | ||
entity_id, | ||
yaw, | ||
pitch, | ||
on_ground, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.