diff options
Diffstat (limited to 'azalea-client/src/local_player.rs')
| -rw-r--r-- | azalea-client/src/local_player.rs | 15 |
1 files changed, 7 insertions, 8 deletions
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<RwLock<PartialWorld>>, /// 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<RwLock<World>>, + pub world: Arc<RwLock<Instance>>, /// 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<ServerboundGamePacket>, - world: Arc<RwLock<World>>, + world: Arc<RwLock<Instance>>, 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 { |
