I know that I can make certain blocks only placeable on a specified block, but what is the command to give an item that can only BREAK certain blocks?
Use the CanDestroy tag on tools:
/give @p minecraft:diamond_pickaxe 1 0 {CanDestroy:["minecraft:stone","minecraft:stonebrick"]}
This will give you an diamond pickaxe that can only break stone and stone bricks.
This will only work in adventure mode.
-
1.13 syntax:
/give @p minecraft:diamond_pickaxe{CanDestroy:["minecraft:stone","minecraft:stonebrick"]}
– pppery Aug 8 '19 at 0:12
You add the tag Can destroy
and then list the items you want destroyed. Tip: It's much easier to just put stone
than minecraft:stone
although if it doesn't work, don't do it.
/give @p minecraft:wooden_shovel 1 0 {CanDestroy:["minecraft:dirt"],Unbreakable:1}
is how you do it, as well as make it unbreakable.
-
3
-
2
-
@Vahx So it essentially doesn't add anything useful: you can't just add some random information to make it viable. – Joachim Oct 19 '19 at 17:19