How to make it to where players can place a lever on a certain block? Adventure Mode [duplicate]

How to make it to where players can place a lever on a certain block? Adventure Mode [duplicate] - Green Trees Near Body of Water

I am creating an adventure map and I need the player to be able to place levers on gold blocks. How can I do this via command block?



Best Answer

You'll want to use the CanPlaceOn NBT tag attached to the item.

/give @p minecraft:Lever 1 0 {CanPlaceOn:["minecraft:gold_block"]}



Pictures about "How to make it to where players can place a lever on a certain block? Adventure Mode [duplicate]"

How to make it to where players can place a lever on a certain block? Adventure Mode [duplicate] - Content female customer with long curly hair wearing casual outfit sitting at wooden table with netbook in classic interior restaurant while making online order
How to make it to where players can place a lever on a certain block? Adventure Mode [duplicate] - Two People Making fire
How to make it to where players can place a lever on a certain block? Adventure Mode [duplicate] - Unrecognizable woman enjoying view of ancient buildings



How do you make items that can only be placed on certain blocks Minecraft?

Activate the Command Block So you would activate the command block by toggling the lever. To activate the command block: If the redstone device is a lever, you need to toggle the lever. If the redstone device is a button, you need to push the button.

How do you activate a command block with a lever?

Custom Minecraft maps make good use of Adventure mode, and many custom maps are set to this game mode; players cannot break blocks or place them, therefore disallowing them to destroy the map, or add anything to it that would ruin the map. Also, it is often used to protect various multiplayer servers from griefers.

Can you hurt players in adventure mode Minecraft?

Adventure mode is a game mode created by the Mojang team, and it was first introduced in Java Edition 1.3. 1 release. In adventure mode, players can only break blocks with the right tool. For example, a pickaxe cannot break a Log, a shovel cannot break stone blocks, and an axe cannot break Dirt.



How to use Can_Break and Can_Place Minecraft bedrock and EDU Tags




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Pixabay, Yan Krukov, Mike, Meruyert Gonullu