aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/bot.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2023-03-07 14:14:36 -0600
committerGitHub <noreply@github.com>2023-03-07 14:14:36 -0600
commit719379a8a76ab0685f2bd14bebe2f0cd1e97f06b (patch)
treece5d6c62bc36fb1d1ec31083bc8e81a0109c12df /azalea/src/bot.rs
parentbf4ff517890cad3ff4e36b4b78959504192e5374 (diff)
downloadazalea-drasl-719379a8a76ab0685f2bd14bebe2f0cd1e97f06b.tar.xz
Bevy 0.10 (#79)
* replace 0.9.1 with 0.10.0 * start migrating to bevy .10 * well it compiles * doesn't immediately panic * remove unused imports * fmt * delete azalea-ecs * make RelativeEntityUpdate an EntityCommand * fix a doc test * explain what FixedUpdate does
Diffstat (limited to 'azalea/src/bot.rs')
-rw-r--r--azalea/src/bot.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/azalea/src/bot.rs b/azalea/src/bot.rs
index ce5b9fdc..a45ae28d 100644
--- a/azalea/src/bot.rs
+++ b/azalea/src/bot.rs
@@ -1,14 +1,14 @@
-use azalea_core::Vec3;
-use azalea_ecs::{
- app::{App, Plugin, PluginGroup, PluginGroupBuilder},
+use crate::app::{App, CoreSchedule, IntoSystemAppConfig, Plugin, PluginGroup, PluginGroupBuilder};
+use crate::ecs::{
component::Component,
entity::Entity,
event::EventReader,
query::{With, Without},
- schedule::IntoSystemDescriptor,
+ schedule::IntoSystemConfig,
system::{Commands, Query},
- AppTickExt,
};
+use azalea_core::Vec3;
+use azalea_physics::{force_jump_listener, PhysicsSet};
use azalea_world::entity::{metadata::Player, set_rotation, Jumping, Local, Physics, Position};
use std::f64::consts::PI;
@@ -20,14 +20,14 @@ impl Plugin for BotPlugin {
fn build(&self, app: &mut App) {
app.add_event::<LookAtEvent>()
.add_event::<JumpEvent>()
- .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"));
+ .add_systems((
+ insert_bot,
+ look_at_listener.before(force_jump_listener),
+ jump_listener,
+ stop_jumping
+ .in_schedule(CoreSchedule::FixedUpdate)
+ .after(PhysicsSet),
+ ));
}
}