Advertisement
Link712011

Bread crafter

Apr 14th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. function select_item(item)
  2.     local slot = 1
  3.    
  4.     while slot <= 16 do
  5.         local data = turtle.getItemDetail(slot)
  6.         if data and data.name == item then
  7.             turtle.select(slot)
  8.             return true
  9.         end
  10.         slot = slot + 1
  11.     end
  12.     return false
  13. end
  14.  
  15. while true do
  16.     turtle.craft()
  17.     if select_item("minecraft:bread") then
  18.         turtle.drop()
  19.     end
  20.     print("Job finished. Going to sleep 500 seconds now")
  21.     sleep(500)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement