0

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.

3

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"]}
-1

If your using Pocket Edition, try this

/replaceitem entity @p slot.hotbar 0 quartz_block 1 0 {"minecraft:can_place_on":{"blocks":["stone","dirt"]}}

  • 1
    The OP is not, looking at the tags used in his post. – Joachim Sep 18 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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