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/local_player.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'azalea-client/src/local_player.rs') diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs index d31f840f..be847e78 100644 --- a/azalea-client/src/local_player.rs +++ b/azalea-client/src/local_player.rs @@ -2,14 +2,13 @@ use std::{collections::HashMap, io, sync::Arc}; use azalea_auth::game_profile::GameProfile; use azalea_core::ChunkPos; -use azalea_ecs::component::Component; -use azalea_ecs::entity::Entity; -use azalea_ecs::event::EventReader; -use azalea_ecs::{query::Added, system::Query}; use azalea_protocol::packets::game::ServerboundGamePacket; use azalea_world::{ entity::{self, Dead}, - PartialWorld, World, + Instance, PartialWorld, +}; +use bevy_ecs::{ + component::Component, entity::Entity, event::EventReader, query::Added, system::Query, }; use derive_more::{Deref, DerefMut}; use parking_lot::RwLock; @@ -44,7 +43,7 @@ pub struct LocalPlayer { pub partial_world: Arc>, /// The world is the combined [`PartialWorld`]s of all clients in the same /// world. (Only relevant if you're using a shared world, i.e. a swarm) - pub world: Arc>, + pub world: Arc>, /// A task that reads packets from the server. The client is disconnected /// when this task ends. @@ -88,7 +87,7 @@ impl LocalPlayer { pub fn new( entity: Entity, packet_writer: mpsc::UnboundedSender, - world: Arc>, + world: Arc>, read_packets_task: JoinHandle<()>, write_packets_task: JoinHandle<()>, ) -> Self { @@ -129,7 +128,7 @@ impl Drop for LocalPlayer { /// Update the [`LocalPlayerInLoadedChunk`] component for all [`LocalPlayer`]s. pub fn update_in_loaded_chunk( - mut commands: azalea_ecs::system::Commands, + mut commands: bevy_ecs::system::Commands, query: Query<(Entity, &LocalPlayer, &entity::Position)>, ) { for (entity, local_player, position) in &query { -- cgit v1.2.3