I want to /give a iron shovel that can break coarse dirt for my map. I tried the following command:
/give @a iron_shovel 1 0 {"can_destroy":{"blocks":["coarse_dirt"]}}
But it turns out coarse dirt is just dirt with data 1. How can I do this?
minecraft-bedrock-editionminecraft-commands
I want to /give a iron shovel that can break coarse dirt for my map. I tried the following command:
/give @a iron_shovel 1 0 {"can_destroy":{"blocks":["coarse_dirt"]}}
But it turns out coarse dirt is just dirt with data 1. How can I do this?
Best Answer
Data? No.
The issue is
coarse_dirt
is not a block. Coarse dirt has the IDdirt
and is of data1
. There is no way to put data in can destroy/place ons so use the command:Unfortunately this will allow the shovel to break regular dirt and coarse dirt.
Possible Workaround
If you are just making this for yourself and/or friends or plan on distributing a world download, you can use either of the following:
Resource Packs
Change a rarely used block/a block that you are not using and instead of its default texture assign it to the coarse dirt's texture (don't just copy-paste the PNG file, modify the
blocks.json
so if someone has a texture pack it will look normal).Behaviour Packs + Resource Packs
Add an entirely new block to the game and assign the coarse dirt texture to it (don't just copy-paste the PNG file, modify the
blocks.json
so if someone has a texture pack it will look normal).I won't explain how to create a resource/behaviour pack in this answer because that veers off-course from the question.