Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate]
![Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - Electric drill press making hole in timber plank fixed with carpenter vice on workshop table Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - Electric drill press making hole in timber plank fixed with carpenter vice on workshop table](/assets/images/minecraft_bedrock_edition_give_lever_that_can_only_be_placed_on_a_specific_block_duplicate_0.jpeg)
In my Minecraft world I am building a map and in this map I need to be able to give the player a lever that can be placed on only one block of my choice (like a gold block for instance).
I tried these commands in a command block
give @p lever 1 0 {CanPlaceOn:[“gold_block”]}
give @p lever 1 0 {CanPlaceOn:[“minecraft:gold_block”]}
give @p lever 1 0 {CanPlaceOn:[gold_block]}
give @p lever 1 0 {CanPlaceOn:[“Block:gold_block]}
All of them give me an error at the syntax past the CanPlaceOn:[
(copy/paste them into your world and you’ll see what I mean).
What am I doing wrong? I've checked all over the internet and it seems there aren’t any really clear guides on how to do this (and I know it can be done because there is a map on mcpedl.com that is called “Escape!” and you get a lever that can only be placed on gold blocks).
Best Answer
This is the proper command syntax for MCPE:
/give @p lever 1 0 {"can_place_on":{"blocks":["gold_block"]}}
You can change the block or placeable item after the /give @p lever
but it has to be a placeable item.
Also changing the block or adding more do this:
To change the block you want to place it on, just change the string inside the square brackets after
{"blocks":["**this string here**"]}}
.Adding more blocks:
/give @p lever 1 0 {"can_place_on":{"blocks":["gold_block", "iron_block"]}}
Pictures about "Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate]"
![Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - White Metal High-rise Viewing Deck Building Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - White Metal High-rise Viewing Deck Building](/assets/images/minecraft_bedrock_edition_give_lever_that_can_only_be_placed_on_a_specific_block_duplicate_1.jpeg)
![Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - Facade of modern residential house Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - Facade of modern residential house](/assets/images/minecraft_bedrock_edition_give_lever_that_can_only_be_placed_on_a_specific_block_duplicate_2.jpeg)
![Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - Exterior of modern white building corner with commerce organization located in urban city district on clear autumn day Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate] - Exterior of modern white building corner with commerce organization located in urban city district on clear autumn day](/assets/images/minecraft_bedrock_edition_give_lever_that_can_only_be_placed_on_a_specific_block_duplicate_3.jpeg)
Quick Answer about "Minecraft Bedrock Edition: Give lever that can only be placed on a specific block [duplicate]"
- To change the block you want to place it on, just change the string inside the square brackets after {"blocks":["**this string here**"]}} .
- Adding more blocks: /give @p lever 1 0 {"can_place_on":{"blocks":["gold_block", "iron_block"]}}
How do you make it so an item can only be placed on a certain block?
Select the lever in your hotbar. Then position your pointer (the plus sign) on the block where you want to place the lever. You should now see the lever on the ground next to the command block.How do you make items that can only be placed on certain blocks bedrock?
To get a repeating command block, players must use the /give command like so: /give @p minecraft:repeating_command_block <amount> . Players can also change a normal command block into a repeating command block by selecting the option in the command block GUI.How to get items and blocks that can only be placed on or break specific blocks
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ono Kosuki, Pixabay, Maria Orlova, Meruyert Gonullu