From c1588ef66e844c067112ea880a54b4de9ec5a062 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sat, 25 Feb 2023 17:32:15 -0600 Subject: Fix system order ambiguities (#74) * start fixing stuff where systems run in the wrong order * fix ordering ambiguity * add debugging guide * some fixes * fix panic for swarms * fix some warnings --- azalea/src/bot.rs | 10 +++++++--- azalea/src/pathfinder/mod.rs | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'azalea/src') diff --git a/azalea/src/bot.rs b/azalea/src/bot.rs index 1f3822ac..ce5b9fdc 100644 --- a/azalea/src/bot.rs +++ b/azalea/src/bot.rs @@ -20,9 +20,13 @@ impl Plugin for BotPlugin { fn build(&self, app: &mut App) { app.add_event::() .add_event::() - .add_system(insert_bot.before("deduplicate_entities")) - .add_system(look_at_listener) - .add_system(jump_listener.label("jump_listener").before("ai_step")) + .add_system(insert_bot) + .add_system( + look_at_listener + .before("force_jump_listener") + .before(azalea_world::entity::update_bounding_box), + ) + .add_system(jump_listener.label("jump_listener")) .add_tick_system(stop_jumping.after("ai_step")); } } diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 1dfb7a9b..8289d9c4 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -36,10 +36,10 @@ impl Plugin for PathfinderPlugin { fn build(&self, app: &mut App) { app.add_event::() .add_event::() - .add_tick_system(tick_execute_path.before("walk_listener")) + .add_tick_system(tick_execute_path.before("ai_step")) .add_system(goto_listener) - .add_system(add_default_pathfinder.after("deduplicate_entities")) - .add_system(handle_tasks) + .add_system(add_default_pathfinder) + .add_system(handle_tasks.before(path_found_listener)) .add_system(path_found_listener); } } -- cgit v1.2.3