diff options
| author | mat <git@matdoes.dev> | 2024-02-17 14:43:42 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-02-17 14:43:42 -0600 |
| commit | be4f13c36c281f086602092098522b3f25fc0680 (patch) | |
| tree | 599d2de84d06d7d1c31a908a2e89499c62e0a5ca /azalea-client | |
| parent | 64d48897afe5bcb40931f8ef8b3594fe275751e8 (diff) | |
| download | azalea-drasl-be4f13c36c281f086602092098522b3f25fc0680.tar.xz | |
upgrade deps, bevy 0.13
Diffstat (limited to 'azalea-client')
| -rw-r--r-- | azalea-client/Cargo.toml | 20 | ||||
| -rw-r--r-- | azalea-client/src/entity_query.rs | 21 | ||||
| -rw-r--r-- | azalea-client/src/interact.rs | 2 | ||||
| -rw-r--r-- | azalea-client/src/inventory.rs | 2 | ||||
| -rw-r--r-- | azalea-client/src/mining.rs | 4 | ||||
| -rw-r--r-- | azalea-client/src/packet_handling/game.rs | 4 |
6 files changed, 27 insertions, 26 deletions
diff --git a/azalea-client/Cargo.toml b/azalea-client/Cargo.toml index 37e450ac..cbf2b1de 100644 --- a/azalea-client/Cargo.toml +++ b/azalea-client/Cargo.toml @@ -10,7 +10,7 @@ version = "0.9.0" [dependencies] simdnbt = { version = "0.4", git = "https://github.com/azalea-rs/simdnbt" } -reqwest = { version = "0.11.23", default-features = false } +reqwest = { version = "0.11.24", default-features = false } anyhow = "1.0.79" async-trait = "0.1.77" azalea-auth = { path = "../azalea-auth", version = "0.9.0" } @@ -23,11 +23,11 @@ azalea-buf = { path = "../azalea-buf", version = "0.9.0" } azalea-protocol = { path = "../azalea-protocol", version = "0.9.0" } azalea-registry = { path = "../azalea-registry", version = "0.9.0" } azalea-world = { path = "../azalea-world", version = "0.9.0" } -bevy_app = "0.12.1" -bevy_ecs = "0.12.1" -bevy_log = { version = "0.12.1", optional = true } -bevy_tasks = "0.12.1" -bevy_time = "0.12.1" +bevy_app = "0.13.0" +bevy_ecs = "0.13.0" +bevy_log = { version = "0.13.0", optional = true } +bevy_tasks = "0.13.0" +bevy_time = "0.13.0" azalea-inventory = { path = "../azalea-inventory", version = "0.9.0" } derive_more = { version = "0.99.17", features = ["deref", "deref_mut"] } futures = "0.3.30" @@ -36,12 +36,12 @@ nohash-hasher = "0.2.0" once_cell = "1.19.0" parking_lot = { version = "^0.12.1", features = ["deadlock_detection"] } regex = "1.10.3" -thiserror = "^1.0.56" -tokio = { version = "^1.35.1", features = ["sync"] } +thiserror = "^1.0.57" +tokio = { version = "^1.36.0", features = ["sync"] } uuid = "^1.7.0" azalea-entity = { version = "0.9.0", path = "../azalea-entity" } -serde_json = "1.0.111" -serde = "1.0.195" +serde_json = "1.0.113" +serde = "1.0.196" minecraft_folder_path = "0.1.2" [features] 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) -> <Q as WorldQuery>::Item<'w> { - ecs.query::<Q>() + pub fn query<'w, D: QueryData>(&self, ecs: &'w mut World) -> D::Item<'w> { + ecs.query::<D>() .get_mut(ecs, self.entity) .unwrap_or_else(|_| { panic!( "Our client is missing a required component {:?}", - std::any::type_name::<Q>() + std::any::type_name::<D>() ) }) } @@ -58,7 +59,7 @@ impl Client { /// ``` /// /// [`Entity`]: bevy_ecs::entity::Entity - pub fn entity_by<F: ReadOnlyWorldQuery, Q: ReadOnlyWorldQuery>( + pub fn entity_by<F: QueryFilter, Q: QueryData>( &mut self, predicate: impl EntityPredicate<Q, F>, ) -> Option<Entity> { @@ -93,14 +94,14 @@ impl Client { } } -pub trait EntityPredicate<Q: ReadOnlyWorldQuery, Filter: ReadOnlyWorldQuery> { +pub trait EntityPredicate<Q: QueryData, Filter: QueryFilter> { fn find(&self, ecs_lock: Arc<Mutex<World>>) -> Option<Entity>; } impl<F, Q, Filter> EntityPredicate<Q, Filter> for F where F: Fn(&ROQueryItem<Q>) -> bool, - Q: ReadOnlyWorldQuery, - Filter: ReadOnlyWorldQuery, + Q: QueryData, + Filter: QueryFilter, { fn find(&self, ecs_lock: Arc<Mutex<World>>) -> Option<Entity> { 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(&<Q1 as WorldQuery>::Item<'_>, &<Q2 as WorldQuery>::Item<'_>) -> -// bool, Q1: ReadOnlyWorldQuery, -// Q2: ReadOnlyWorldQuery, +// bool, Q1: QueryFilter, +// Q2: QueryFilter, // { // fn find(&self, ecs: &mut Ecs) -> Option<Entity> { // // (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) => { |
