0

I've been playing the Bedrock version of Minecraft on Switch and I'm trying to get a lever that can only be placed on a gold block this is what I entered in the command block:

/give @p lever 1 0 {CanPlaceOn:["Block_of_Gold"]}

After that it just says

Line 1 Column 2 Missing '}' or object member name

Can anyone tell me what I'm doing wrong?

1
  • 1
    It's not called "Block_of_Gold". Look at the wiki for block ID names. Jun 23, 2018 at 18:23

1 Answer 1

1

As Fabian pointed out, the name for “Block of Gold” isn’t Block_of_Gold, it’s gold_block. Bedrock Edition uses JSON format, not NBT, so the command would be:

/give @p lever 1 0 {"can_place_on":{"blocks":["gold_block"]}}

See this post for more information on using "can_place_on".

Source: Block of Gold on Minecraft Gamepedia

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .