Minecraft – How to make only certain blocks of the same type breakable

minecraft-commandsminecraft-java-edition

I am creating an adventure map, and am experimenting with using the NBT tags CanDestroy and CanPlaceOn to control which blocks a player can place/break. I have already made a pickaxe that can mine iron ore.

But there is more than one piece of iron ore in my world, and I would like to be able to control which iron ore blocks a player can mine.

Currently, I can only set it so that the pickaxe can mine ALL iron ore, or NO iron ore.

How can I choose which iron ores are breakable by the pickaxe?

Best Answer

Sorry, not possible. You can only set items to be able to break ALL of one block type, or NONE. It is not possible to choose only certain breakable blocks.

You can try using commands to replace the decoration block if a player tries to break it, and kill the item drops before the player can pick them up.
Or, you can consider retexturing a different block to look like iron ore and have those as the decoration blocks. Although these decoration blocks may look like iron ore, they're different blocks made to look like iron ore, and therefore won't be registered as breakable.

But those two methods are about entirely different methods for entirely different posts. Try searching online for a way to accomplish your task.