diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-03-07 14:14:36 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-07 14:14:36 -0600 |
| commit | 719379a8a76ab0685f2bd14bebe2f0cd1e97f06b (patch) | |
| tree | ce5d6c62bc36fb1d1ec31083bc8e81a0109c12df /azalea-client/src/local_player.rs | |
| parent | bf4ff517890cad3ff4e36b4b78959504192e5374 (diff) | |
| download | azalea-drasl-719379a8a76ab0685f2bd14bebe2f0cd1e97f06b.tar.xz | |
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
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 { |
