aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/interact.rs
diff options
context:
space:
mode:
authorShayne Hartford <shaybox@shaybox.com>2024-10-21 20:21:38 -0400
committerGitHub <noreply@github.com>2024-10-21 19:21:38 -0500
commitcd2f298a62819a3fabc52ef17560c2124a74d555 (patch)
tree3e32e4ccc7d9f095696c8e23b688b06cf1188f76 /azalea-client/src/interact.rs
parent5535877a4bddcdc30ef8f752a90e6845b308c3c2 (diff)
downloadazalea-drasl-cd2f298a62819a3fabc52ef17560c2124a74d555.tar.xz
Rename InventoryComponent to Inventory to match other components (#177)
(cherry picked from commit 266058a8d441169b46ef819595eee62337ab324c)
Diffstat (limited to 'azalea-client/src/interact.rs')
-rw-r--r--azalea-client/src/interact.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs
index 7b14be09..94b60ddc 100644
--- a/azalea-client/src/interact.rs
+++ b/azalea-client/src/interact.rs
@@ -33,7 +33,7 @@ use tracing::warn;
use crate::{
attack::handle_attack_event,
- inventory::{InventoryComponent, InventorySet},
+ inventory::{Inventory, InventorySet},
local_player::{LocalGameMode, PermissionLevel, PlayerAbilities},
movement::MoveEventsSet,
packet_handling::game::{handle_send_packet_event, SendPacketEvent},
@@ -237,7 +237,7 @@ pub fn check_is_interaction_restricted(
instance: &Instance,
block_pos: &BlockPos,
game_mode: &GameMode,
- inventory: &InventoryComponent,
+ inventory: &Inventory,
) -> bool {
match game_mode {
GameMode::Adventure => {
@@ -314,10 +314,7 @@ pub fn handle_swing_arm_event(
#[allow(clippy::type_complexity)]
fn update_modifiers_for_held_item(
- mut query: Query<
- (&mut Attributes, &InventoryComponent),
- (With<LocalEntity>, Changed<InventoryComponent>),
- >,
+ mut query: Query<(&mut Attributes, &Inventory), (With<LocalEntity>, Changed<Inventory>)>,
) {
for (mut attributes, inventory) in &mut query {
let held_item = inventory.held_item();