aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/mod.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-01-18 10:15:41 +0800
committermat <git@matdoes.dev>2026-01-18 11:18:36 +0900
commit5c3ea8e1d97d92b4ea9c406bbb59f928ee0c6a66 (patch)
treec7acff524da2229a0bc933ef1bf8a9c3e91d0bc6 /azalea/src/pathfinder/mod.rs
parent81e5a0200a4fe5438ab67c82600f063410d637c0 (diff)
downloadazalea-drasl-5c3ea8e1d97d92b4ea9c406bbb59f928ee0c6a66.tar.xz
don't fail parkour jumps that collide with ceiling blocks horizontally
Diffstat (limited to 'azalea/src/pathfinder/mod.rs')
-rw-r--r--azalea/src/pathfinder/mod.rs32
1 files changed, 8 insertions, 24 deletions
diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs
index ee5c50c0..04c1d58c 100644
--- a/azalea/src/pathfinder/mod.rs
+++ b/azalea/src/pathfinder/mod.rs
@@ -31,15 +31,12 @@ use std::{
};
use astar::Edge;
-use azalea_client::{
- StartWalkEvent, inventory::InventorySystems, mining::MiningSystems, movement::MoveEventsSystems,
-};
+use azalea_client::{StartWalkEvent, inventory::InventorySystems, movement::MoveEventsSystems};
use azalea_core::{
position::{BlockPos, Vec3},
tick::GameTick,
};
use azalea_entity::{LocalEntity, Position, inventory::Inventory, metadata::Player};
-use azalea_physics::PhysicsSystems;
use azalea_world::{WorldName, Worlds};
use bevy_app::{PreUpdate, Update};
use bevy_ecs::prelude::*;
@@ -64,7 +61,10 @@ use crate::{
query::{With, Without},
system::{Commands, Query, Res},
},
- pathfinder::{astar::a_star, moves::MovesCtx, world::CachedWorld},
+ pathfinder::{
+ astar::a_star, execute::DefaultPathfinderExecutionPlugin, moves::MovesCtx,
+ world::CachedWorld,
+ },
};
#[derive(Clone, Default)]
@@ -74,24 +74,7 @@ impl Plugin for PathfinderPlugin {
app.add_message::<GotoEvent>()
.add_message::<PathFoundEvent>()
.add_message::<StopPathfindingEvent>()
- .add_systems(
- // putting systems in the GameTick schedule makes them run every Minecraft tick
- // (every 50 milliseconds).
- GameTick,
- (
- execute::timeout_movement,
- execute::patching::check_for_path_obstruction,
- execute::check_node_reached,
- execute::tick_execute_path,
- debug_render_path_with_particles,
- execute::recalculate_near_end_of_path,
- execute::recalculate_if_has_goal_but_no_path,
- )
- .chain()
- .after(PhysicsSystems)
- .after(azalea_client::movement::send_position)
- .after(MiningSystems),
- )
+ .add_systems(GameTick, debug_render_path_with_particles)
.add_systems(PreUpdate, add_default_pathfinder)
.add_systems(
Update,
@@ -105,7 +88,8 @@ impl Plugin for PathfinderPlugin {
.chain()
.before(MoveEventsSystems)
.before(InventorySystems),
- );
+ )
+ .add_plugins(DefaultPathfinderExecutionPlugin);
}
}