diff options
| author | mat <github@matdoes.dev> | 2023-03-08 19:26:40 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2023-03-08 19:26:40 +0000 |
| commit | f28efd5637cf3e129af018066421c090cb73ad50 (patch) | |
| tree | b9fefb31f4f315d794b5b8ff8e8426337619d94b /azalea-client/src/local_player.rs | |
| parent | 5ce830ae6ce12982cdfa578673374de7444abf3f (diff) | |
| download | azalea-drasl-f28efd5637cf3e129af018066421c090cb73ad50.tar.xz | |
make ClientInformation and TabList their own components
Diffstat (limited to 'azalea-client/src/local_player.rs')
| -rw-r--r-- | azalea-client/src/local_player.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs index be847e78..7ec3d0dc 100644 --- a/azalea-client/src/local_player.rs +++ b/azalea-client/src/local_player.rs @@ -1,4 +1,4 @@ -use std::{collections::HashMap, io, sync::Arc}; +use std::{io, sync::Arc}; use azalea_auth::game_profile::GameProfile; use azalea_core::ChunkPos; @@ -14,11 +14,10 @@ use derive_more::{Deref, DerefMut}; use parking_lot::RwLock; use thiserror::Error; use tokio::{sync::mpsc, task::JoinHandle}; -use uuid::Uuid; use crate::{ events::{Event, LocalPlayerEvents}, - ClientInformation, PlayerInfo, WalkDirection, + ClientInformation, WalkDirection, }; /// This is a component for our local player entities that are probably in a @@ -33,11 +32,7 @@ use crate::{ #[derive(Component)] pub struct LocalPlayer { packet_writer: mpsc::UnboundedSender<ServerboundGamePacket>, - /// Some of the "settings" for this client that are sent to the server, such - /// as render distance. - pub client_information: ClientInformation, - /// A map of player UUIDs to their information in the tab list - pub players: HashMap<Uuid, PlayerInfo>, + /// The partial world is the world this client currently has loaded. It has /// a limited render distance. pub partial_world: Arc<RwLock<PartialWorld>>, @@ -96,9 +91,6 @@ impl LocalPlayer { LocalPlayer { packet_writer, - client_information: ClientInformation::default(), - players: HashMap::new(), - world, partial_world: Arc::new(RwLock::new(PartialWorld::new( client_information.view_distance.into(), |
