aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/simulation.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2026-03-06 11:12:07 +0500
committermat <git@matdoes.dev>2026-03-06 11:12:07 +0500
commit8dc511bb1b77da67d5428e8bafeab92ad3bfabf4 (patch)
treeb155417c3470412bc9dcf2f39f8440f71c805335 /azalea/src/pathfinder/simulation.rs
parent62eb3ec38cca04ac09156bb2693a9f8ca82b3da6 (diff)
downloadazalea-drasl-8dc511bb1b77da67d5428e8bafeab92ad3bfabf4.tar.xz
fix various regressions from optimization attempts
Diffstat (limited to 'azalea/src/pathfinder/simulation.rs')
-rw-r--r--azalea/src/pathfinder/simulation.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/azalea/src/pathfinder/simulation.rs b/azalea/src/pathfinder/simulation.rs
index 72e5e048..82d93370 100644
--- a/azalea/src/pathfinder/simulation.rs
+++ b/azalea/src/pathfinder/simulation.rs
@@ -152,9 +152,17 @@ impl Simulation {
}
pub fn tick(&mut self) {
+ self.run_update_schedule();
+ self.run_gametick_schedule();
+ }
+
+ pub fn run_update_schedule(&mut self) {
self.app.update();
+ }
+ pub fn run_gametick_schedule(&mut self) {
self.app.world_mut().run_schedule(GameTick);
}
+
pub fn component<T: Component + Clone>(&self) -> T {
self.app.world().get::<T>(self.entity).unwrap().clone()
}