Xenogami

colorWoolTurtle

Jan 24th, 2021 (edited)
793
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- If chunk unloads or server resets, this will reorient to the proper facing and makes sure the inv is clear
  2. function firstRun()
  3.     while turtle.detectDown() == false do
  4.         sleep(1)
  5.         print(turtle.down())
  6.     end
  7.     while redstone.getInput("left") == false do
  8.         print(turtle.turnLeft())
  9.     end
  10. end
  11.  
  12. function checkStart()
  13.     if redstone.getInput("back") then
  14.         runStart()
  15.     else
  16.         sleep(5)
  17.     end
  18. end
  19.  
  20. function runStart()
  21.     turtle.select(1)
  22.     turtle.suckDown(4)
  23.     runFirstFour()
  24.     turtle.suckDown(4)
  25.     runSecondFour()
  26.     turtle.suckDown(4)
  27.     runThirdFour()
  28.     turtle.suckDown(4)
  29.     runFourthFour()
  30. end
  31.  
  32. function runFirstFour()
  33.     turtle.up()
  34.     turtle.up()
  35.     turtle.up()
  36.     turtle.up()
  37. turtle.up()
  38.     for a=1,4 do
  39.         getCraft()
  40.         turtle.dropUp(1)
  41.     end
  42.     turtle.down()
  43.     turtle.down()
  44.     turtle.down()
  45.     turtle.down()
  46. end
  47.  
  48. function runSecondFour()
  49.     turtle.up()
  50.     turtle.up()
  51.     turtle.up()
  52.     for a=1,4 do
  53.         getCraft()
  54.         turtle.up()
  55.         turtle.dropUp(1)
  56.         turtle.down()
  57.     end
  58.     turtle.down()
  59.     turtle.down()
  60.     turtle.down()
  61. end
  62.  
  63. function runThirdFour()
  64.     turtle.up()
  65.     turtle.up()
  66.     for a=1,4 do
  67.         getCraft()
  68.         turtle.up()
  69.         turtle.up()
  70.         turtle.dropUp(1)
  71.         turtle.down()
  72.         turtle.down()
  73.     end
  74.     turtle.down()
  75.     turtle.down()
  76. end
  77.  
  78. function runFourthFour()
  79.     turtle.up()
  80.     for a=1,4 do
  81.         getCraft()
  82.         turtle.up()
  83.         turtle.up()
  84.         turtle.up()
  85.         turtle.dropUp(1)
  86.         turtle.down()
  87.         turtle.down()
  88.         turtle.down()
  89.     end
  90.     turtle.down()
  91. end
  92.  
  93. function getCraft()
  94.     turtle.select(2)
  95.     turtle.suck(1)
  96.     turtle.select(3)
  97.     print(turtle.craft(1))
  98.     turtle.turnRight()
  99. end
  100.  
  101. firstRun()
  102. while true do
  103.     runStart()
  104. end
RAW Paste Data