From be4f13c36c281f086602092098522b3f25fc0680 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 17 Feb 2024 14:43:42 -0600 Subject: upgrade deps, bevy 0.13 --- azalea-client/src/entity_query.rs | 21 +++++++++++---------- azalea-client/src/interact.rs | 2 +- azalea-client/src/inventory.rs | 2 +- azalea-client/src/mining.rs | 4 ++-- azalea-client/src/packet_handling/game.rs | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) (limited to 'azalea-client/src') diff --git a/azalea-client/src/entity_query.rs b/azalea-client/src/entity_query.rs index 42b7b0ca..be892ee5 100644 --- a/azalea-client/src/entity_query.rs +++ b/azalea-client/src/entity_query.rs @@ -3,7 +3,8 @@ use std::sync::Arc; use bevy_ecs::{ component::Component, entity::Entity, - query::{ROQueryItem, ReadOnlyWorldQuery, WorldQuery}, + query::QueryData, + query::{QueryFilter, ROQueryItem}, world::World, }; use parking_lot::Mutex; @@ -22,13 +23,13 @@ impl Client { /// .is_some(); /// # } /// ``` - pub fn query<'w, Q: WorldQuery>(&self, ecs: &'w mut World) -> ::Item<'w> { - ecs.query::() + pub fn query<'w, D: QueryData>(&self, ecs: &'w mut World) -> D::Item<'w> { + ecs.query::() .get_mut(ecs, self.entity) .unwrap_or_else(|_| { panic!( "Our client is missing a required component {:?}", - std::any::type_name::() + std::any::type_name::() ) }) } @@ -58,7 +59,7 @@ impl Client { /// ``` /// /// [`Entity`]: bevy_ecs::entity::Entity - pub fn entity_by( + pub fn entity_by( &mut self, predicate: impl EntityPredicate, ) -> Option { @@ -93,14 +94,14 @@ impl Client { } } -pub trait EntityPredicate { +pub trait EntityPredicate { fn find(&self, ecs_lock: Arc>) -> Option; } impl EntityPredicate for F where F: Fn(&ROQueryItem) -> bool, - Q: ReadOnlyWorldQuery, - Filter: ReadOnlyWorldQuery, + Q: QueryData, + Filter: QueryFilter, { fn find(&self, ecs_lock: Arc>) -> Option { let mut ecs = ecs_lock.lock(); @@ -114,8 +115,8 @@ where // impl<'a, F, Q1, Q2> EntityPredicate<'a, (Q1, Q2)> for F // where // F: Fn(&::Item<'_>, &::Item<'_>) -> -// bool, Q1: ReadOnlyWorldQuery, -// Q2: ReadOnlyWorldQuery, +// bool, Q1: QueryFilter, +// Q2: QueryFilter, // { // fn find(&self, ecs: &mut Ecs) -> Option { // // (self)(query) diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index 026e94ca..8a3aa49b 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -156,7 +156,7 @@ pub fn handle_block_interact_event( sequence: sequence_number.0, } .get(), - }) + }); } } diff --git a/azalea-client/src/inventory.rs b/azalea-client/src/inventory.rs index bf421bf4..4bfed69f 100644 --- a/azalea-client/src/inventory.rs +++ b/azalea-client/src/inventory.rs @@ -708,7 +708,7 @@ pub fn handle_container_click_event( carried_item: inventory.carried.clone(), } .get(), - }) + }); } } diff --git a/azalea-client/src/mining.rs b/azalea-client/src/mining.rs index d2e66ca8..f0b86db1 100644 --- a/azalea-client/src/mining.rs +++ b/azalea-client/src/mining.rs @@ -253,7 +253,7 @@ fn handle_start_mining_block_with_direction_event( entity: event.entity, position: event.position, destroy_stage: mine_progress.destroy_stage(), - }) + }); } send_packet_events.send(SendPacketEvent { @@ -572,7 +572,7 @@ fn continue_mining_block( entity, position: mining.pos, direction: mining.dir, - }) + }); } swing_arm_events.send(SwingArmEvent { entity }); diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index 91a3c835..080ef270 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -1176,7 +1176,7 @@ pub fn process_packet_events(ecs: &mut World) { let mut client_side_close_container_events = system_state.get_mut(ecs); client_side_close_container_events.send(ClientSideCloseContainerEvent { entity: player_entity, - }) + }); } ClientboundGamePacket::Cooldown(_) => {} ClientboundGamePacket::CustomChatCompletions(_) => {} @@ -1225,7 +1225,7 @@ pub fn process_packet_events(ecs: &mut World) { window_id: p.container_id, menu_type: p.menu_type, title: p.title.to_owned(), - }) + }); } ClientboundGamePacket::OpenSignEditor(_) => {} ClientboundGamePacket::Ping(p) => { -- cgit v1.2.3