diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-03-07 14:14:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-07 14:14:36 -0600 |
| commit | 719379a8a76ab0685f2bd14bebe2f0cd1e97f06b (patch) | |
| tree | ce5d6c62bc36fb1d1ec31083bc8e81a0109c12df /azalea/src/lib.rs | |
| parent | bf4ff517890cad3ff4e36b4b78959504192e5374 (diff) | |
| download | azalea-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/lib.rs')
| -rw-r--r-- | azalea/src/lib.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index 827c3904..c58ca7b1 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -6,18 +6,15 @@ pub mod pathfinder; pub mod prelude; pub mod swarm; +use app::{App, Plugin, PluginGroup}; pub use azalea_block as blocks; pub use azalea_client::*; pub use azalea_core::{BlockPos, Vec3}; -use azalea_ecs::{ - app::{App, Plugin}, - component::Component, -}; pub use azalea_protocol as protocol; pub use azalea_registry::EntityKind; -pub use azalea_world::{entity, World}; +pub use azalea_world::{entity, Instance}; use bot::DefaultBotPlugins; -use ecs::app::PluginGroup; +use ecs::component::Component; use futures::Future; use protocol::{ resolver::{self, ResolverError}, @@ -26,7 +23,10 @@ use protocol::{ use thiserror::Error; use tokio::sync::mpsc; -pub type HandleFn<Fut, S> = fn(Client, Event, S) -> Fut; +pub use bevy_app as app; +pub use bevy_ecs as ecs; + +pub type HandleFn<Fut, S> = fn(Client, azalea_client::Event, S) -> Fut; #[derive(Error, Debug)] pub enum StartError { @@ -142,6 +142,7 @@ where // An event that causes the schedule to run. This is only used internally. let (run_schedule_sender, run_schedule_receiver) = mpsc::unbounded_channel(); + let ecs_lock = start_ecs(self.app, run_schedule_receiver, run_schedule_sender.clone()); let (bot, mut rx) = Client::start_client( |
