VENDING MACHINE
After placing the command blocks like in the video, paste the listed commands always starting from the bottom command block and then going up.
/tp @e[type=item,x=248,y=4,z=2,r=0] ~ ~-1 ~
/execute @e[type=item,x=248,y=3,z=4,r=0] ~ ~ ~ detect ~ ~1 ~-2 stone_button 10 give @p[r=10] egg
/execute @e[type=item,x=248,y=3,z=4,r=0] ~ ~ ~ detect ~ ~2 ~-2 stone_button 10 give @p[r=10] potion
/execute @e[type=item,x=248,y=3,z=4,r=0] ~ ~ ~ detect ~ ~3 ~-2 stone_button 10 give @p[r=10] bread
/execute @e[type=item,x=248,y=3,z=4,r=0] ~ ~ ~ detect ~ ~1 ~-2 stone_button 10 kill @e[type=item,x=248,y=3,z=4,r=0]
/execute @e[type=item,x=248,y=3,z=4,r=0] ~ ~ ~ detect ~ ~2 ~-2 stone_button 10 kill @e[type=item,x=248,y=3,z=4,r=0]
/execute @e[type=item,x=248,y=3,z=4,r=0] ~ ~ ~ detect ~ ~3 ~-2 stone_button 10 kill @e[type=item,x=248,y=3,z=4,r=0]
Command blocks
Tutorial viewed times
COPYRIGHT © THEREDENGINEER. ALL RIGHTS RESERVED.
THIS WEBSITE IS NOT ENDORSED, ASSOCIATED OR AFFILIATED WITH MOJANG AB.