Advertisement
sanovskiy

fixceil

Oct 25th, 2013
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. function goodblock()
  2.   if not(turtle.detectUp()) then
  3.     return false
  4.   end
  5.   for ii=1,4,1 do
  6.     turtle.select(ii)
  7.     if turtle.compareUp() then
  8.       return true
  9.     end
  10.   end
  11.   return false
  12. end
  13. function fixCeil()
  14.   while turtle.detectUp() and not(goodblock()) do
  15.     turtle.digUp()
  16.     sleep(1)
  17.   end
  18.   while turtle.getItemCount(curslot)<2 do
  19.     curslot=curslot+1
  20.     if curslot>4 then
  21.       curslot=1
  22.     end
  23.     turtle.select(curslot)
  24.     sleep(.3)
  25.   end
  26.   turtle.placeUp()
  27. end
  28. curslot=1
  29. while turtle.forward() do
  30.   if not(goodblock()) then
  31.     fixCeil()
  32.   end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement