0

I don’t know how these work. I want a iron shovel that can break dirt and grass and planks that can be placed on dirt. How would I do this. Are the commands different on pocket edition? Because I looked it up and tried but they didn’t work.

/give @p minecraft:stone_shovel 1 0 {CanDestroy:[minecraft:dirt, minecraft:gravel, minecraft:soulsand]} 

/give @p minecraft:gravel 1 0 {CanPlaceOn:["minecraft:stone","minecraft:stonebrick"]}
2
  • Post the commands you used, and we can potentially identify what went wrong, or what you might be missing
    – Ben
    Commented Jun 27, 2019 at 2:18
  • /give @p minecraft:stone_shovel 1 0 {CanDestroy:[minecraft:dirt, minecraft:gravel, minecraft:soulsand]} (I don’t need soul sand) and /give @p minecraft:gravel 1 0 {CanPlaceOn:["minecraft:stone","minecraft:stonebrick"]}. That’s not what I wanted though I just tried to see if I could get the hang of it and they didn’t work. Commented Jun 27, 2019 at 2:23

1 Answer 1

0

important note:
I haven't tested this yet

According to the Minecraft wiki, the final part in the syntax of the give command is the Following:

components: json (optional)‌[Bedrock Edition only]

Like DataTags but only supports CanPlaceOn and CanDestroy functions (for example, /give @p iron_shovel 1 0 {"minecraft:can_destroy":{"blocks":["grass"]}})

so to fix your command, make it like this: (Changes are marked with a Boldened word)

/give @p stone_shovel 1 0 {"minecraft:can_destroy":{"blocks":["grass, dirt, soulsand"]}}

And the second one:

give @p gravel 1 0 {"minecraft:can_place_on":{"blocks":["stonebrick"]}}

EXPLANATION:

the reason why your command didn't work is

  1. it uses the old minecraft:dirt item ids, which doesn't work on the bedrock edition of Minecraft because it uses a different id system
  2. it immediately said 0 {>>>CanPlaceOn<<<:["m instead of 0 {">>>minecraft:can_place_on<<<":{" which doesn't work because it's incorrect syntax
1
  • OK funny story, it doesn’t. I tried the shovel one and it told me “can destroy” could not be updated. Commented Jun 28, 2019 at 19:28

Not the answer you're looking for? Browse other questions tagged .