Skip to content

Commit

Permalink
Add Clientbound Set Block Destroy Stage
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Aug 20, 2024
1 parent ace7a77 commit 7d89a4e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
20 changes: 20 additions & 0 deletions pumpkin-protocol/src/client/play/c_block_destroy_stage.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use pumpkin_macros::packet;
use serde::Serialize;

use crate::{position::WorldPosition, VarInt};

#[derive(Serialize)]
#[packet(0x06)]
pub struct CSetBlockDestroyStage {
entity_id: VarInt,
location: WorldPosition,
destroy_stage: u8,
}

impl CSetBlockDestroyStage {
pub fn new(entity_id: VarInt,
location: WorldPosition,
destroy_stage: u8) -> Self {
Self { entity_id, location, destroy_stage }
}
}
6 changes: 4 additions & 2 deletions pumpkin-protocol/src/client/play/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ mod c_entity_animation;
mod c_entity_metadata;
mod c_entity_velocity;
mod c_game_event;
mod c_worldevent;
mod c_head_rot;
mod c_hurt_animation;
mod c_login;
Expand All @@ -29,9 +28,11 @@ mod c_system_chat_message;
mod c_update_entitiy_pos_rot;
mod c_update_entity_pos;
mod c_update_entity_rot;
mod c_worldevent;
mod c_block_destroy_stage;
mod player_action;

pub use c_worldevent::*;
pub use c_block_destroy_stage::*;
pub use c_actionbar::*;
pub use c_block_update::*;
pub use c_center_chunk::*;
Expand Down Expand Up @@ -62,4 +63,5 @@ pub use c_system_chat_message::*;
pub use c_update_entitiy_pos_rot::*;
pub use c_update_entity_pos::*;
pub use c_update_entity_rot::*;
pub use c_worldevent::*;
pub use player_action::*;

0 comments on commit 7d89a4e

Please sign in to comment.