diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-27 22:02:00 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-27 22:02:00 -0600 |
| commit | 9513f42e87f64c409cdb2a100500a50e5a713bac (patch) | |
| tree | bb6aa8b6d50fddf967bcb1f759e023754ea84e49 /azalea-client/src/plugins/mining.rs | |
| parent | 588902ba4a3965982bdd84d92b20c6f7613f3978 (diff) | |
| download | azalea-drasl-9513f42e87f64c409cdb2a100500a50e5a713bac.tar.xz | |
Move Client struct to azalea crate (#297)
* move the Client struct out of azalea-client into azalea
* actually add client impls in azalea
Diffstat (limited to 'azalea-client/src/plugins/mining.rs')
| -rw-r--r-- | azalea-client/src/plugins/mining.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/azalea-client/src/plugins/mining.rs b/azalea-client/src/plugins/mining.rs index 56136362..e9dcbe59 100644 --- a/azalea-client/src/plugins/mining.rs +++ b/azalea-client/src/plugins/mining.rs @@ -15,7 +15,6 @@ use derive_more::{Deref, DerefMut}; use tracing::{debug, trace, warn}; use crate::{ - Client, interact::{ BlockStatePredictionHandler, SwingArmEvent, can_use_game_master_blocks, check_is_interaction_restricted, pick::HitResultComponent, @@ -71,31 +70,6 @@ impl Plugin for MiningPlugin { #[derive(Clone, Debug, Eq, Hash, PartialEq, SystemSet)] pub struct MiningSystems; -impl Client { - pub fn start_mining(&self, position: BlockPos) { - let mut ecs = self.ecs.lock(); - - ecs.write_message(StartMiningBlockEvent { - entity: self.entity, - position, - force: true, - }); - } - - /// 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) { - let mut ecs = self.ecs.lock(); - let mut entity_mut = ecs.entity_mut(self.entity); - - if enabled { - entity_mut.insert(LeftClickMine); - } else { - entity_mut.remove::<LeftClickMine>(); - } - } -} - /// A component that simulates the client holding down left click to mine the /// block that it's facing, but this only interacts with blocks and not /// entities. |
