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-client/src/entity_query.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'azalea-client/src/entity_query.rs') diff --git a/azalea-client/src/entity_query.rs b/azalea-client/src/entity_query.rs index e39a7d2f..8fe94659 100644 --- a/azalea-client/src/entity_query.rs +++ b/azalea-client/src/entity_query.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use azalea_ecs::{ +use bevy_ecs::{ component::Component, - ecs::Ecs, entity::Entity, query::{ROQueryItem, ReadOnlyWorldQuery, WorldQuery}, + world::World, }; use parking_lot::Mutex; @@ -22,7 +22,7 @@ impl Client { /// .is_some(); /// # } /// ``` - pub fn query<'w, Q: WorldQuery>(&self, ecs: &'w mut Ecs) -> ::Item<'w> { + pub fn query<'w, Q: WorldQuery>(&self, ecs: &'w mut World) -> ::Item<'w> { ecs.query::() .get_mut(ecs, self.entity) .expect("Our client is missing a required component.") @@ -38,7 +38,7 @@ impl Client { /// Note that this will very likely change in the future. /// ``` /// use azalea_client::{Client, GameProfileComponent}; - /// use azalea_ecs::query::With; + /// use bevy_ecs::query::With; /// use azalea_world::entity::{Position, metadata::Player}; /// /// # fn example(mut bot: Client, sender_name: String) { @@ -74,7 +74,7 @@ impl Client { } pub trait EntityPredicate { - fn find(&self, ecs_lock: Arc>) -> Option; + fn find(&self, ecs_lock: Arc>) -> Option; } impl EntityPredicate<(Q,), Filter> for F where @@ -82,7 +82,7 @@ where Q: ReadOnlyWorldQuery, Filter: ReadOnlyWorldQuery, { - fn find(&self, ecs_lock: Arc>) -> Option { + fn find(&self, ecs_lock: Arc>) -> Option { let mut ecs = ecs_lock.lock(); let mut query = ecs.query_filtered::<(Entity, Q), Filter>(); let entity = query.iter(&ecs).find(|(_, q)| (self)(q)).map(|(e, _)| e); -- cgit v1.2.3