diff options
Diffstat (limited to 'azalea-client/src')
| -rw-r--r-- | azalea-client/src/client.rs | 10 | ||||
| -rw-r--r-- | azalea-client/src/interact.rs | 4 | ||||
| -rw-r--r-- | azalea-client/src/local_player.rs | 7 | ||||
| -rw-r--r-- | azalea-client/src/packet_handling.rs | 15 |
4 files changed, 17 insertions, 19 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 332db1f1..89e33dbc 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -22,8 +22,8 @@ use azalea_auth::{game_profile::GameProfile, sessionserver::ClientSessionServerE use azalea_chat::FormattedText; use azalea_core::Vec3; use azalea_entity::{ - indexing::EntityIdIndex, metadata::Health, EntityPlugin, EntityUpdateSet, EyeHeight, Local, - Position, + indexing::EntityIdIndex, metadata::Health, EntityPlugin, EntityUpdateSet, EyeHeight, + LocalEntity, Position, }; use azalea_physics::PhysicsPlugin; use azalea_protocol::{ @@ -316,7 +316,7 @@ impl Client { mining: mining::MineBundle::default(), attack: attack::AttackBundle::default(), - _local: Local, + _local: LocalEntity, }); Ok((client, rx)) @@ -584,7 +584,7 @@ impl Client { } /// A bundle for the components that are present on a local player that received -/// a login packet. If you want to filter for this, just use [`Local`]. +/// a login packet. If you want to filter for this, just use [`LocalEntity`]. #[derive(Bundle)] pub struct JoinedClientBundle { pub local_player: LocalPlayer, @@ -606,7 +606,7 @@ pub struct JoinedClientBundle { pub mining: mining::MineBundle, pub attack: attack::AttackBundle, - pub _local: Local, + pub _local: LocalEntity, } pub struct AzaleaPlugin; diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index 2f7480cb..b28baca5 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -3,7 +3,7 @@ use std::ops::AddAssign; use azalea_block::BlockState; use azalea_core::{BlockHitResult, BlockPos, Direction, GameMode, Vec3}; use azalea_entity::{ - clamp_look_direction, view_vector, Attributes, EyeHeight, Local, LookDirection, Position, + clamp_look_direction, view_vector, Attributes, EyeHeight, LocalEntity, LookDirection, Position, }; use azalea_inventory::{ItemSlot, ItemSlotData}; use azalea_nbt::NbtList; @@ -318,7 +318,7 @@ pub fn handle_swing_arm_event( fn update_modifiers_for_held_item( mut query: Query< (&mut Attributes, &InventoryComponent), - (With<Local>, Changed<InventoryComponent>), + (With<LocalEntity>, Changed<InventoryComponent>), >, ) { for (mut attributes, inventory) in &mut query { diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs index 0c89b4a7..1bcb0948 100644 --- a/azalea-client/src/local_player.rs +++ b/azalea-client/src/local_player.rs @@ -23,10 +23,11 @@ use crate::{ /// world. If you have access to a [`Client`], you probably don't need to care /// about this since `Client` gives you access to everything here. /// -/// You can also use the [`Local`] marker component for queries if you're only -/// checking for a local player and don't need the contents of this component. +/// You can also use the [`LocalEntity`] marker component for queries if you're +/// only checking for a local player and don't need the contents of this +/// component. /// -/// [`Local`]: azalea_entity::Local +/// [`LocalEntity`]: azalea_entity::LocalEntity /// [`Client`]: crate::Client #[derive(Component)] pub struct LocalPlayer { diff --git a/azalea-client/src/packet_handling.rs b/azalea-client/src/packet_handling.rs index c103bef4..c95cbdba 100644 --- a/azalea-client/src/packet_handling.rs +++ b/azalea-client/src/packet_handling.rs @@ -709,11 +709,10 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::TeleportEntity(p) => { let mut system_state: SystemState<( Commands, - Query<(&EntityIdIndex, &LocalPlayer, Option<&mut Physics>)>, + Query<(&EntityIdIndex, &LocalPlayer)>, )> = SystemState::new(ecs); let (mut commands, mut query) = system_state.get_mut(ecs); - let (entity_id_index, local_player, physics) = - query.get_mut(player_entity).unwrap(); + let (entity_id_index, local_player) = query.get_mut(player_entity).unwrap(); let entity = entity_id_index.get(&MinecraftEntityId(p.id)); @@ -741,11 +740,10 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::MoveEntityPos(p) => { let mut system_state: SystemState<( Commands, - Query<(&EntityIdIndex, &LocalPlayer, Option<&mut Physics>)>, + Query<(&EntityIdIndex, &LocalPlayer)>, )> = SystemState::new(ecs); let (mut commands, mut query) = system_state.get_mut(ecs); - let (entity_id_index, local_player, physics) = - query.get_mut(player_entity).unwrap(); + let (entity_id_index, local_player) = query.get_mut(player_entity).unwrap(); let entity = entity_id_index.get(&MinecraftEntityId(p.entity_id)); @@ -770,11 +768,10 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::MoveEntityPosRot(p) => { let mut system_state: SystemState<( Commands, - Query<(&EntityIdIndex, &LocalPlayer, Option<&mut Physics>)>, + Query<(&EntityIdIndex, &LocalPlayer)>, )> = SystemState::new(ecs); let (mut commands, mut query) = system_state.get_mut(ecs); - let (entity_id_index, local_player, physics) = - query.get_mut(player_entity).unwrap(); + let (entity_id_index, local_player) = query.get_mut(player_entity).unwrap(); let entity = entity_id_index.get(&MinecraftEntityId(p.entity_id)); |
