diff options
| author | mat <git@matdoes.dev> | 2023-08-25 23:28:19 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-08-25 23:28:19 -0500 |
| commit | 472496b7b808b4c6ac6f8e161a5bc1d08f5b0524 (patch) | |
| tree | b839d9c63829c3e215940f05cdcf0b17cd226300 /azalea-client/src/mining.rs | |
| parent | 2773146fbfd9b61c0ea09210b6d7b9760be5e7dc (diff) | |
| download | azalea-drasl-472496b7b808b4c6ac6f8e161a5bc1d08f5b0524.tar.xz | |
fix all bevy ambiguities
Diffstat (limited to 'azalea-client/src/mining.rs')
| -rw-r--r-- | azalea-client/src/mining.rs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/azalea-client/src/mining.rs b/azalea-client/src/mining.rs index c087c467..3d43e712 100644 --- a/azalea-client/src/mining.rs +++ b/azalea-client/src/mining.rs @@ -2,6 +2,7 @@ use azalea_block::{Block, BlockState, FluidState}; use azalea_core::{BlockPos, Direction, GameMode}; use azalea_entity::{mining::get_mine_progress, FluidOnEyes, Physics}; use azalea_inventory::ItemSlot; +use azalea_physics::PhysicsSet; use azalea_protocol::packets::game::serverbound_player_action_packet::{ self, ServerboundPlayerActionPacket, }; @@ -16,7 +17,7 @@ use crate::{ can_use_game_master_blocks, check_is_interaction_restricted, CurrentSequenceNumber, HitResultComponent, SwingArmEvent, }, - inventory::InventoryComponent, + inventory::{InventoryComponent, InventorySet}, local_player::{LocalGameMode, SendPacketEvent}, Client, }; @@ -31,7 +32,7 @@ impl Plugin for MinePlugin { .add_event::<StopMiningBlockEvent>() .add_event::<MineBlockProgressEvent>() .add_event::<AttackBlockEvent>() - .add_systems(FixedUpdate, continue_mining_block) + .add_systems(FixedUpdate, continue_mining_block.before(PhysicsSet)) .add_systems( Update, ( @@ -40,11 +41,23 @@ impl Plugin for MinePlugin { handle_finish_mining_block_event, handle_stop_mining_block_event, ) - .chain(), + .chain() + .in_set(MiningSet) + .after(InventorySet) + .before(azalea_entity::update_bounding_box) + .after(azalea_entity::update_fluid_on_eyes) + .after(crate::interact::update_hit_result_component) + .after(crate::attack::handle_attack_event) + .after(crate::interact::handle_block_interact_event) + .before(crate::interact::handle_swing_arm_event) + .before(azalea_physics::handle_force_jump), ); } } +#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)] +pub struct MiningSet; + impl Client { pub fn start_mining(&mut self, position: BlockPos) { self.ecs.lock().send_event(StartMiningBlockEvent { |
