diff options
Diffstat (limited to 'azalea-client/src/mining.rs')
| -rw-r--r-- | azalea-client/src/mining.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/azalea-client/src/mining.rs b/azalea-client/src/mining.rs index 049bc859..c087c467 100644 --- a/azalea-client/src/mining.rs +++ b/azalea-client/src/mining.rs @@ -18,6 +18,7 @@ use crate::{ }, inventory::InventoryComponent, local_player::{LocalGameMode, SendPacketEvent}, + Client, }; /// A plugin that allows clients to break blocks in the world. @@ -44,6 +45,15 @@ impl Plugin for MinePlugin { } } +impl Client { + pub fn start_mining(&mut self, position: BlockPos) { + self.ecs.lock().send_event(StartMiningBlockEvent { + entity: self.entity, + position, + }); + } +} + /// Information about the block we're currently mining. This is only present if /// we're currently mining a block. #[derive(Component)] |
