Minecraft – How to make a CanDestroy tool on Minecraft Bedrock Edition?

minecraft-bedrock-editionminecraft-commands

I've been putting in the command:

/give @p iron_pickaxe 1 0 {CanDestroy: ["diamond_ore"]}

I've been putting this into a command block. I've repeatedly tried to fix it, change it a little, re-enter it, I even destroyed the command block and tried a new one. Nothing worked. It's been saying the same thing:

Line 1, Column 2
Missing: "}" or object member name

What am I doing wrong here?

Command Block window

Best Answer

In MCBE, you can not directly use {CanDestroy:["minecraft:diamond_ore"]}. Use instead:

/give @p minecraft:iron_pickaxe 1 0 {"minecraft:can_destroy":{"blocks":["diamond_ore"]}}

which used a JSON like syntax on that.