mojira.dev
MC-48157

NBT Modifier CanDestroy does not work with /setblock and /blockdata

When used as a modifier for an item created using the /setblock or /blockdata commands, CanDestroy effect will not be added to the item.

Command I used:
/blockdata ~1 ~ ~ {Items:[{id:minecraft:stick,Count:1,CanDestroy:["minecraft:grass"]}]}

Attachments

Comments 1

You want to set an attribute of the Stick, not of the chest, thus the additional attributes are the "tags" of the stick:

/blockdata ~1 ~ ~ {Items:[{id:minecraft:stick,Count:1,tag:{CanDestroy:["minecraft:grass"]}}]}

Samuel Frazee

(Unassigned)

Unconfirmed

Minecraft 14w06b

Retrieved