SHARE
TWEET

Untitled

xmann110 Aug 15th, 2019 (edited) 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- [FUEL, ECHEST, BLOCKS]
  2.  
  3. function getBlocks()
  4.     turtle.select(2)
  5.     local items = turtle.getItemCount()
  6.     if items < 32 then
  7.         turtle.select(2)
  8.         turtle.placeUp()
  9.         turtle.select(3)
  10.         turtle.suckUp(64 - items)
  11.         turtle.select(2)
  12.         turtle.digUp()
  13.     end
  14. end
  15.  
  16. function refuel()
  17.     if turtle.getFuelLevel() < 5 then
  18.         turtle.select(1)
  19.         turtle.refuel(1)
  20.     end
  21. end
  22.  
  23. local fails = 0
  24.  
  25. while true do
  26.     getBlocks()
  27.     refuel()
  28.     while turtle.back() do
  29.         refuel()
  30.         turtle.select(3)
  31.         turtle.place()
  32.         fails = 0
  33.     end
  34.     turtle.turnLeft()
  35.     fails = fails + 1
  36.     if fails == 4 then
  37.         break
  38.     end
  39. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top