3

I'm making a map and I'm trying to give the player an item that can only destroy one type of wool. So far this is the command I have:

/give @p minecraft:brick 1 0 {CanDestroy:"minecraft:wool"}
2
  • 1
    I'm 90% sure I've seen this question before, and sadly I am 90% sure this can't be done, because CanDestroy takes a list of item ids rather than a list of compound Item tags.
    – MrLemon
    Jan 18 '16 at 16:34
  • 1
    @MrLemon Aye, it's currently not possible at all. Once BlockStates are fully implemented, which looks to be in 1.10 (source). I imagine the tag would become something along the lines of CanDestroy:["minecraft:oak_fence[east=true]"].
    – Skylinerw
    Jan 18 '16 at 16:43
-1

Because I unfortunately cannot comment:

Here is what the comand should be:

/give @p minecraft:brick 1 0 {CanDestroy:"35:1"}

This will only let the player destroy orange wool. However, the following happens:

  1. Other types of wool cannot be destroyed
  2. Other types of blocks cannot be destroyed
  3. The orange wool block shows the animation of being destroyed and holding the mouse button on it will continuously hit the block
  4. The orange wool will end the break animation and start again.
  5. Go back to #3 and repeat.

So this could be a bug as the game is recognizing that the brick can destroy that block but it is not letting it.]

Hope this at least helped.

3
  • I cannot verify this behavior in 1.8.9, and your NBT tag is actually not valid. CanDestroy takes a list of strings, not a string, so it should at least be CanDestroy:["35:1"] but that leads to "Can destroy missingno" in the tooltip, as with every invalid block name.
    – MrLemon
    Jan 24 '16 at 10:35
  • I was using 1.8.9 when testing this and it did prevent me from starting the destroying animation of the white wool and started it on the orange wool. So I am not sure about this either. Jan 24 '16 at 11:56
  • 1
    This does not work and the behavior you described is simply latency; the client did not understand you were in adventure mode right away. You have to specify whole block IDs and cannot specify a Damage value. It is simply impossible unless Mojang adds in functionality for it. Your NBT is invalid as MrLemon stated so has no relevance to whether or not it works; you can replicate the latency with your bare fists.
    – Skylinerw
    Jan 24 '16 at 12:15

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