How can I make this possible?



  • I'm making a map. I want the player to create a stone button but they are on adventure mode so i need a command that makes it possible to be placed on something so when they make the button it can be replaced with a button that can be placed on dirt.



  • Is this what you wanted? (Gfycat Link)

    This is the contraption I used:

    Contraption

    1 is Repeat, Unconditional and Always Active

    /testfor @p {Inventory:[{id:minecraft:stone_button}],CanPlaceOn:["minecraft:dirt"]}
    

    2 is Repeat, Unconditional and Needs Redstone

    /testfor @p {Inventory:[{id:minecraft:stone_button}]}
    

    3 is Impulse, Unconditional and Needs Redstone

    /clear @p stone_button
    

    4 is Chain, Conditional and Always Active

    /give @p minecraft:stone_button 1 0 {CanPlaceOn:["minecraft:dirt"]}
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2