Add Serverbound Player Input
This commit is contained in:
1 parent
f30da32848
commit
1f8385e890
4 files changed
+14
-5
No files matched your search
@@ -94,7 +94,3 @@ Consider joining our [discord](https://discord.gg/wT8XjrjKkf) to stay up-to-date
|
|||||||
## Funding
|
## Funding
|
||||||
|
|
||||||
If you want to fund me and help the project, Check out my [GitHub sponsors](https://github.com/sponsors/Snowiiii) or my [PayPal](https://www.paypal.me/alexxmedvedev)
|
If you want to fund me and help the project, Check out my [GitHub sponsors](https://github.com/sponsors/Snowiiii) or my [PayPal](https://www.paypal.me/alexxmedvedev)
|
||||||
|
|
||||||
## Thanks
|
|
||||||
|
|
||||||
A big thanks to [wiki.vg](https://wiki.vg/) for providing valuable information used in the development of this project.
|
|
||||||
@@ -12,6 +12,7 @@ mod s_player_abilities;
|
|||||||
mod s_player_action;
|
mod s_player_action;
|
||||||
mod s_player_command;
|
mod s_player_command;
|
||||||
mod s_player_ground;
|
mod s_player_ground;
|
||||||
|
mod s_player_input;
|
||||||
mod s_player_position;
|
mod s_player_position;
|
||||||
mod s_player_position_rotation;
|
mod s_player_position_rotation;
|
||||||
mod s_player_rotation;
|
mod s_player_rotation;
|
||||||
@@ -35,6 +36,7 @@ pub use s_player_abilities::*;
|
|||||||
pub use s_player_action::*;
|
pub use s_player_action::*;
|
||||||
pub use s_player_command::*;
|
pub use s_player_command::*;
|
||||||
pub use s_player_ground::*;
|
pub use s_player_ground::*;
|
||||||
|
pub use s_player_input::*;
|
||||||
pub use s_player_position::*;
|
pub use s_player_position::*;
|
||||||
pub use s_player_position_rotation::*;
|
pub use s_player_position_rotation::*;
|
||||||
pub use s_player_rotation::*;
|
pub use s_player_rotation::*;
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
use pumpkin_macros::server_packet;
|
||||||
|
|
||||||
|
#[derive(serde::Deserialize)]
|
||||||
|
#[server_packet("play:player_input")]
|
||||||
|
pub struct SPlayerInput {
|
||||||
|
// Yep exactly how it looks like
|
||||||
|
_input: i8,
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@ use pumpkin_protocol::{
|
|||||||
},
|
},
|
||||||
server::play::{
|
server::play::{
|
||||||
SChatCommand, SChatMessage, SClientInformationPlay, SClientTickEnd, SConfirmTeleport,
|
SChatCommand, SChatMessage, SClientInformationPlay, SClientTickEnd, SConfirmTeleport,
|
||||||
SInteract, SPlayerAbilities, SPlayerAction, SPlayerCommand, SPlayerPosition,
|
SInteract, SPlayerAbilities, SPlayerAction, SPlayerCommand, SPlayerInput, SPlayerPosition,
|
||||||
SPlayerPositionRotation, SPlayerRotation, SSetCreativeSlot, SSetHeldItem, SSetPlayerGround,
|
SPlayerPositionRotation, SPlayerRotation, SSetCreativeSlot, SSetHeldItem, SSetPlayerGround,
|
||||||
SSwingArm, SUseItem, SUseItemOn,
|
SSwingArm, SUseItem, SUseItemOn,
|
||||||
},
|
},
|
||||||
@@ -675,6 +675,9 @@ impl Player {
|
|||||||
self.handle_client_information(SClientInformationPlay::read(bytebuf)?)
|
self.handle_client_information(SClientInformationPlay::read(bytebuf)?)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
SPlayerInput::PACKET_ID => {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
SInteract::PACKET_ID => {
|
SInteract::PACKET_ID => {
|
||||||
self.handle_interact(SInteract::read(bytebuf)?).await;
|
self.handle_interact(SInteract::read(bytebuf)?).await;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user