-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added chest opening and closing animation (#421)
* Added basic chest opening and closing * Added number tracking * Added play chest action function
- Loading branch information
1 parent
205191b
commit ad2fd3c
Showing
6 changed files
with
99 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use pumpkin_core::math::position::WorldPosition; | ||
|
||
use pumpkin_macros::client_packet; | ||
use serde::Serialize; | ||
|
||
use crate::VarInt; | ||
|
||
#[derive(Serialize)] | ||
#[client_packet("play:block_event")] | ||
pub struct CBlockAction<'a> { | ||
location: &'a WorldPosition, | ||
action_id: u8, | ||
action_parameter: u8, | ||
block_type: VarInt, | ||
} | ||
|
||
impl<'a> CBlockAction<'a> { | ||
pub fn new( | ||
location: &'a WorldPosition, | ||
action_id: u8, | ||
action_parameter: u8, | ||
block_type: VarInt, | ||
) -> Self { | ||
Self { | ||
location, | ||
action_id, | ||
action_parameter, | ||
block_type, | ||
} | ||
} | ||
} |
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