1

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?What am I exactly doing wrong?

  • What are you doing wrong? I don't know, playing Windows 10 edition? The error has nothing to do with your command. I would suggest filing a bug report, but apparently they don't even look at that, so I guess you have to either switch to an older version where it still worked or wait for the developers to randomly stumble upon the same problem and fix it. Moral of the story: MCPE is evil, use Java Edition. – Fabian Röling Feb 5 '18 at 7:14
  • try this: /give @p minecraft:iron_pick 1 0 {CanDestroy:["minecraft:diamond_ore"]} – Baumi Feb 5 '18 at 8:26
  • 5
    Does this answer your question? How do you add NBT tags to commands in Minecraft Pocket/Bedrock Edition? – pppery Dec 26 '19 at 21:10
1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.