Add Serverbound Player Input
This commit is contained in:
parent
f30da32848
commit
1f8385e890
@ -94,7 +94,3 @@ Consider joining our [discord](https://discord.gg/wT8XjrjKkf) to stay up-to-date
|
||||
## 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)
|
||||
|
||||
## 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_command;
|
||||
mod s_player_ground;
|
||||
mod s_player_input;
|
||||
mod s_player_position;
|
||||
mod s_player_position_rotation;
|
||||
mod s_player_rotation;
|
||||
@ -35,6 +36,7 @@ pub use s_player_abilities::*;
|
||||
pub use s_player_action::*;
|
||||
pub use s_player_command::*;
|
||||
pub use s_player_ground::*;
|
||||
pub use s_player_input::*;
|
||||
pub use s_player_position::*;
|
||||
pub use s_player_position_rotation::*;
|
||||
pub use s_player_rotation::*;
|
||||
|
||||
8
pumpkin-protocol/src/server/play/s_player_input.rs
Normal file
8
pumpkin-protocol/src/server/play/s_player_input.rs
Normal file
@ -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::{
|
||||
SChatCommand, SChatMessage, SClientInformationPlay, SClientTickEnd, SConfirmTeleport,
|
||||
SInteract, SPlayerAbilities, SPlayerAction, SPlayerCommand, SPlayerPosition,
|
||||
SInteract, SPlayerAbilities, SPlayerAction, SPlayerCommand, SPlayerInput, SPlayerPosition,
|
||||
SPlayerPositionRotation, SPlayerRotation, SSetCreativeSlot, SSetHeldItem, SSetPlayerGround,
|
||||
SSwingArm, SUseItem, SUseItemOn,
|
||||
},
|
||||
@ -675,6 +675,9 @@ impl Player {
|
||||
self.handle_client_information(SClientInformationPlay::read(bytebuf)?)
|
||||
.await;
|
||||
}
|
||||
SPlayerInput::PACKET_ID => {
|
||||
// TODO
|
||||
}
|
||||
SInteract::PACKET_ID => {
|
||||
self.handle_interact(SInteract::read(bytebuf)?).await;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user