Minecraft – way to have an item which can break SPECIFIC BLOCKS with SPECIFIC FACING

minecraft-commandsminecraft-java-edition

I know it's possible to make block breakable by items, but I wonder if I could make an item which can only break the specified blocks if they're facing a given direction.

Best Answer

This is not possible. `CanDestroy" simply does not have that feature.

You could try using raycasting to determine whether the player is looking at a block with the right block state or not and then give a shovel that can or can not break blocks, but that is very complicated and not fully reliable.