diff options
| author | mat <git@matdoes.dev> | 2026-01-06 06:34:19 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-01-06 06:34:19 -0500 |
| commit | fdbcfaab4813da928f9f27e119d4951088c3a853 (patch) | |
| tree | 19f33692f882ada386f8b6aea1e1a195a905e286 /azalea/src/client_impl/mining.rs | |
| parent | 9c2c7c3497a74e80d7186fdcd97ce2518520faa6 (diff) | |
| download | azalea-drasl-fdbcfaab4813da928f9f27e119d4951088c3a853.tar.xz | |
add a few more convenience functions and update some docs
Diffstat (limited to 'azalea/src/client_impl/mining.rs')
| -rw-r--r-- | azalea/src/client_impl/mining.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/azalea/src/client_impl/mining.rs b/azalea/src/client_impl/mining.rs index 980fc47f..11c74480 100644 --- a/azalea/src/client_impl/mining.rs +++ b/azalea/src/client_impl/mining.rs @@ -1,4 +1,4 @@ -use azalea_client::mining::{LeftClickMine, StartMiningBlockEvent}; +use azalea_client::mining::{LeftClickMine, Mining, StartMiningBlockEvent}; use azalea_core::position::BlockPos; use crate::Client; @@ -14,6 +14,11 @@ impl Client { }); } + /// Returns true if the client is currently trying to mine a block. + pub fn is_mining(&self) -> bool { + self.get_component::<Mining>().is_some() + } + /// When enabled, the bot will mine any block that it is looking at if it is /// reachable. pub fn left_click_mine(&self, enabled: bool) { |
