aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/bot.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-08-25 23:28:19 -0500
committermat <git@matdoes.dev>2023-08-25 23:28:19 -0500
commit472496b7b808b4c6ac6f8e161a5bc1d08f5b0524 (patch)
treeb839d9c63829c3e215940f05cdcf0b17cd226300 /azalea/src/bot.rs
parent2773146fbfd9b61c0ea09210b6d7b9760be5e7dc (diff)
downloadazalea-drasl-472496b7b808b4c6ac6f8e161a5bc1d08f5b0524.tar.xz
fix all bevy ambiguities
Diffstat (limited to 'azalea/src/bot.rs')
-rw-r--r--azalea/src/bot.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/azalea/src/bot.rs b/azalea/src/bot.rs
index 40ab4124..10bf1161 100644
--- a/azalea/src/bot.rs
+++ b/azalea/src/bot.rs
@@ -15,7 +15,7 @@ use azalea_core::{BlockPos, Vec3};
use azalea_entity::{
clamp_look_direction, metadata::Player, EyeHeight, Jumping, Local, LookDirection, Position,
};
-use azalea_physics::{force_jump_listener, PhysicsSet};
+use azalea_physics::{handle_force_jump, PhysicsSet};
use bevy_app::{FixedUpdate, Update};
use bevy_ecs::prelude::Event;
use bevy_ecs::schedule::IntoSystemConfigs;
@@ -35,9 +35,9 @@ impl Plugin for BotPlugin {
(
insert_bot,
look_at_listener
- .before(force_jump_listener)
+ .before(handle_force_jump)
.before(clamp_look_direction),
- jump_listener,
+ jump_listener.before(handle_force_jump),
),
)
.add_systems(FixedUpdate, stop_jumping.after(PhysicsSet));
@@ -138,7 +138,10 @@ impl BotClientExt for azalea_client::Client {
#[derive(Event)]
pub struct JumpEvent(pub Entity);
-fn jump_listener(mut query: Query<(&mut Jumping, &mut Bot)>, mut events: EventReader<JumpEvent>) {
+pub fn jump_listener(
+ mut query: Query<(&mut Jumping, &mut Bot)>,
+ mut events: EventReader<JumpEvent>,
+) {
for event in events.iter() {
if let Ok((mut jumping, mut bot)) = query.get_mut(event.0) {
**jumping = true;