CanPlace tag doesn't work

I am building an Adventure map in gamemode 2, so you can't place Blocks and I want to set a Item / Block in a slot and get a Block which is placeable in gamemode 2:
/replaceitem entity @p slot.inventory.0 quartz_block 1 0 {CanPlace:true}
It doesn't work with this command, please help.
Best Answer
CanPlace
is not a data tag that exists, nor is it a boolean. You are probably looking for the CanPlaceOn
tag, which does exist, but is still not a boolean.
Here's a helpful wiki page on data tags: http://minecraft.gamepedia.com/Player.dat_format
CanPlaceOn
is a list of strings, each string containing the name of a block that it can be placed on. For example, to get a quartz block that can be placed on stone and dirt:
/replaceitem entity @p slot.hotbar.0 quartz_block 1 0 {CanPlaceOn:["minecraft:stone","minecraft:dirt"]}
Pictures about "CanPlace tag doesn't work"



8 reasons why tags don't fire in Google Tag Manager (or they fire when shouldn't)
More answers regarding canPlace tag doesn't work
Answer 2
If your using Pocket Edition, try this
/replaceitem entity @p slot.hotbar 0 quartz_block 1 0 {"minecraft:can_place_on":{"blocks":["stone","dirt"]}}
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Sora Shimazaki, Max Fischer, Clem Onojeghuo, Brett Jordan