Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. wheat_chest = peripheral.wrap('front')
  2.  
  3. function getNum(box, item)
  4. local dat = box.getStackInSlot(1)
  5. if dat and dat.display_name == item then
  6. return dat.qty
  7. end
  8. return 0
  9. end
  10.  
  11. while true do
  12. for slot = 1, 27 do
  13. local dat = box.getStackInSlot(slot)
  14. if dat and dat.display_name == 'minecraft:wheat' and dat.qty >= 3 then
  15. for i = 1, 3 do
  16. turtle.select(i)
  17. turtle.suck(1)
  18. end
  19. turtle.craft()
  20. turtle.turnRight()
  21. for i = 1, 16 do
  22. turtle.select(i)
  23. turtle.drop()
  24. end
  25. turtle.turnLeft()
  26. end
  27. end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement