From 719379a8a76ab0685f2bd14bebe2f0cd1e97f06b Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 7 Mar 2023 14:14:36 -0600 Subject: 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 --- azalea/src/lib.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'azalea/src/lib.rs') 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 = fn(Client, Event, S) -> Fut; +pub use bevy_app as app; +pub use bevy_ecs as ecs; + +pub type HandleFn = 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( -- cgit v1.2.3