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?

  • Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Jun 9 '16 at 2:11
  • 5
    Whoops - Added a close vote on the wrong question. Someone will have to start another. It's How can I make a block only be placed on certain other blocks?
    – aytimothy
    Jun 9 '16 at 2:11

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

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

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