SHARE
TWEET

RameneToChest

Drakaxx Apr 18th, 2019 (edited) 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function xCheckIfFuelNeeded()
  2.     if turtle.getFuelLevel() <= 1000 then
  3.         xFuel()
  4.     end
  5. end
  6.  
  7. function xFuel()
  8.     turtle.select(1)
  9.     turtle.refuel()
  10. end
  11.  
  12. function xDropAndDemiTour()
  13.     for n=1,16 do
  14.         turtle.select(n)
  15.         turtle.dropUp()
  16.     end
  17.     turtle.select(1)
  18.     turtle.turnRight()
  19.     turtle.turnRight()
  20.     turtle.down()
  21.     turtle.down()
  22. end
  23.  
  24. function xSuckAll()
  25.     for m=1,16 do
  26.         turtle.select(m)
  27.         turtle.suck()
  28.     end
  29.     turtle.select(1)
  30. end
  31.  
  32. debut = 1
  33. needRefuel = 0
  34.  
  35. while true do
  36.     shouldForward = 1
  37.     local success, data = turtle.inspect()
  38.     if success then
  39.         if data.name == 'minecraft:netherrack' then
  40.             turtle.up()
  41.             shouldForward = 0
  42.         end
  43.         if data.name == 'minecraft:log' then
  44.             turtle.turnLeft()
  45.             shouldForward = 0
  46.         end
  47.         if data.name == 'minecraft:cobblestone' then
  48.             turtle.turnRight()
  49.             shouldForward = 0
  50.         end
  51.         if data.name == 'minecraft:planks' then
  52.             turtle.down()
  53.             shouldForward = 0
  54.         end
  55.         if data.name == 'chisel:marble1' then
  56.             xDropAndDemiTour()
  57.             shouldForward = 0
  58.         end
  59.         if data.name == 'minecraft:dirt' then
  60.             turtle.down()
  61.             turtle.down()
  62.             shouldForward = 0
  63.         end
  64.         if data.name == 'minecraft:chest' then
  65.             if debut == 0 then
  66.                 os.sleep(180)
  67.             else
  68.                 debut = 0
  69.             end
  70.             xSuckAll()
  71.             xCheckIfFuelNeeded()
  72.             turtle.turnRight()
  73.             turtle.turnRight()
  74.             turtle.up()
  75.             shouldForward = 0
  76.         end
  77.         if shouldForward == 1 then
  78.             turtle.forward()
  79.         end
  80.     else
  81.         turtle.forward()
  82.     end
  83.    
  84. 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