Advertisement
Guest User

layCloud.lua

a guest
Apr 10th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. function isAtop(blockName)
  2.     local _, b = turtle.inspectDown()
  3.     return b and b.name == blockName
  4. end
  5.  
  6. while true do
  7.     if turtle.detectDown() and not isAtop("chisel:cloud") then
  8.         local turn = turtle.turnRight
  9.         if isAtop("quark:midori_pillar") then
  10.             turn = turtle.turnLeft
  11.         end
  12.    
  13.         turn()
  14.         turtle.forward()
  15.         turn()
  16.         turtle.forward()    
  17.     end
  18.    
  19.     turtle.placeDown()
  20.     turtle.forward()
  21.    
  22.     if turtle.getItemCount() < 1 then
  23.         for i = 1, 16 do
  24.             if turtle.getItemCount(i) > 0 then
  25.                 turtle.select(i)
  26.             end
  27.         end
  28.         if turtle.getItemCount() < 1 then
  29.             return
  30.         end
  31.     end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement