Advertisement
osmarks

PotaTron

Nov 11th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. local function find_slot()
  2.     for i = 1, 16 do
  3.         if turtle.getItemSpace(i) > 0 then
  4.             turtle.select(i)
  5.             return
  6.         end
  7.     end
  8. end
  9.  
  10. while true do
  11.     local is_block, data = turtle.inspect()
  12.     if is_block then
  13.         if data.state and data.state.age == 7 then
  14.             find_slot()
  15.             turtle.dropUp()
  16.             turtle.dig()
  17.         end
  18.     else
  19.         turtle.place()
  20.     end
  21.     turtle.turnRight()
  22.     sleep()
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement