Inksaver

flintMaker

Oct 31st, 2020 (edited)
1,513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. version = 20201031.1433
  2. --[[
  3.     https://pastebin.com/dBJ0frzj
  4. ]]
  5. function clear()
  6.     term.clear()
  7.     term.setCursorPos(1, 1)
  8. end
  9.  
  10. function main()
  11.     clear()
  12.     print("Make sure there is empty space above")
  13.     print("Place gravel into max 15 slots")
  14.     print()
  15.     print("Press Enter when ready")
  16.     read()
  17.     local data = {}
  18.     for slot = 1, 16 do
  19.         if turtle.getItemCount(slot) > 0 then
  20.             turtle.select(slot)
  21.             data = turtle.getItemDetail(slot)
  22.             if string.find(data.name, "gravel") ~= nil then
  23.                 while turtle.placeUp() do
  24.                     turtle.digUp()
  25.                 end
  26.             end
  27.         end
  28.     end
  29.     for slot = 16, 2, -1 do
  30.         turtle.select(slot)
  31.         turtle.transferTo(1)
  32.     end
  33. end
  34.  
  35. main()
Add Comment
Please, Sign In to add comment