diff options
Diffstat (limited to 'azalea-client/src/interact.rs')
| -rw-r--r-- | azalea-client/src/interact.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index 64cbd7be..bdb17827 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -11,7 +11,6 @@ use azalea_entity::{ clamp_look_direction, view_vector, Attributes, EyeHeight, LocalEntity, LookDirection, Position, }; use azalea_inventory::{ItemSlot, ItemSlotData}; -use azalea_nbt::NbtList; use azalea_physics::clip::{BlockShapeType, ClipContext, FluidPickType}; use azalea_protocol::packets::game::{ serverbound_interact_packet::InteractionHand, @@ -29,6 +28,7 @@ use bevy_ecs::{ system::{Commands, Query, Res}, }; use derive_more::{Deref, DerefMut}; +use simdnbt::owned::NbtList; use tracing::warn; use crate::{ @@ -272,9 +272,8 @@ pub fn check_block_can_be_broken_by_item_in_adventure_mode( let Some(can_destroy) = item .nbt - .as_compound() - .and_then(|nbt| nbt.get("tag").and_then(|nbt| nbt.as_compound())) - .and_then(|nbt| nbt.get("CanDestroy").and_then(|nbt| nbt.as_list())) + .compound("tag") + .and_then(|nbt| nbt.list("CanDestroy")) else { // no CanDestroy tag return false; |
