-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pr/player action packet #36
Changes from all commits
29ad653
585186f
faebbe1
36b09c0
3160ffb
01f2a5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
use bedrockrs_core::int::{VAR, LE}; | ||
use bedrockrs_proto_derive::ProtoCodec; | ||
use crate::types::network_block_pos::NetworkBlockPos; | ||
use bedrockrs_shared::actor_runtime_id::ActorRuntimeID; | ||
|
||
pub enum PlayerActionType { | ||
Unknown = -1, | ||
StartDestroyBlock = 0, | ||
AbortDestroyBlock, | ||
StopDestroyBlock, | ||
GetUpdatedBlock, | ||
DropItem, | ||
StartSleeping, | ||
StopSleeping, | ||
Respawn, | ||
StartJump, | ||
StartSprinting, | ||
StopSprinting, | ||
StartSneaking, | ||
StopSneaking, | ||
CreativeDestroyBlock, | ||
ChangeDimensionAck, | ||
StartGliding, | ||
StopGlibiding, | ||
DenyDestroyBlock, | ||
CrackBlock, | ||
ChangeSkin, | ||
DeprecatedUpdatedEnchantingSeed, | ||
StartSwimming, | ||
StopSwimming, | ||
StartSpinAttack, | ||
StopSpinAttack, | ||
InteractWithBlock, | ||
PredictDestroyBlock, | ||
ContinueDestroyBlock, | ||
StartItemUseOn, | ||
StopItemUseOn, | ||
HandledTeleport, | ||
MissedSwing, | ||
StartCrawling, | ||
StopCrawling, | ||
StartFlying, | ||
StopFlying, | ||
ClientAckServerData, | ||
Count | ||
} | ||
|
||
#[derive(ProtoCodec, Debug, Clone)] | ||
pub struct PlayerActionPacket { | ||
pub player_runtime_id: ActorRuntimeID, | ||
pub action: VAR<i32>, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you turn this into an enum? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Idk what the fields r, if ya were about to push this, maybe just close pr for now and u push ur stuff There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
pub block_pos: NetworkBlockPos, | ||
pub result_pos: NetworkBlockPos, | ||
pub face: VAR<i32> | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unwrap makes me upset :c
this code here does the same without unwrap