Snowdingerr

sandwall builder

May 26th, 2021 (edited)
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. function placeline()
  2.     while turtle.detectDown() ~= true do
  3.         os.sleep(0.3)
  4.         placesand()
  5.     end
  6. end
  7.  
  8. function placesand()
  9.     if turtle.getItemCount(turtle.getSelectedSlot()) ~= 0 then
  10.         turtle.placeDown()
  11.     elseif turtle.getSelectedSlot() == 16 then
  12.             os.shutdown()
  13.     else do
  14.         turtle.select(turtle.getSelectedSlot() + 1)
  15.         end
  16.     end
  17. end
  18. turtle.select(1)
  19. while turtle.detect() ~= true do
  20.     placeline()
  21.     turtle.forward()
  22. end
Add Comment
Please, Sign In to add comment