aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src')
-rw-r--r--azalea-client/src/interact.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs
index d2dfd93a..0acc6992 100644
--- a/azalea-client/src/interact.rs
+++ b/azalea-client/src/interact.rs
@@ -10,14 +10,13 @@ use azalea_core::{
use azalea_entity::{
clamp_look_direction, view_vector, Attributes, EyeHeight, LocalEntity, LookDirection, Position,
};
-use azalea_inventory::{ItemStack, ItemStackData};
+use azalea_inventory::{components, ItemStack, ItemStackData};
use azalea_physics::clip::{BlockShapeType, ClipContext, FluidPickType};
use azalea_protocol::packets::game::{
s_interact::InteractionHand,
s_swing::ServerboundSwing,
s_use_item_on::{BlockHit, ServerboundUseItemOn},
};
-use azalea_registry::DataComponentKind;
use azalea_world::{Instance, InstanceContainer, InstanceName};
use bevy_app::{App, Plugin, Update};
use bevy_ecs::{
@@ -268,7 +267,7 @@ pub fn check_block_can_be_broken_by_item_in_adventure_mode(
// minecraft caches the last checked block but that's kind of an unnecessary
// optimization and makes the code too complicated
- let Some(_can_destroy) = item.components.get(DataComponentKind::CanBreak) else {
+ if !item.components.has::<components::CanBreak>() {
// no CanDestroy tag
return false;
};