Advertisement
TheMudkip

ManualChunk

Mar 22nd, 2022 (edited)
1,470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.01 KB | None | 0 0
  1. --1 Chunk Manual
  2.  
  3. function fuelcheck(y)
  4.     local level = turtle.getFuelLevel()
  5.     if (level < 256*y)
  6.     then
  7.       write("There is not enough fuel")
  8.       os.shutdown()
  9.     else
  10.       write("There will be "..level - 256*y.." fuel left")
  11.     end
  12. end
  13.  
  14. function layer()
  15.     turtle.digDown()
  16.     turtle.down()
  17.     for i = 1, 16, 1 do
  18.         for e = 1, 15, 1 do
  19.             turtle.dig()
  20.             turtle.forward()
  21.         end
  22.     if(i ~= 16)
  23.         then
  24.             if(i % 2 == 0)
  25.             then
  26.             turtle.turnLeft()
  27.             turtle.dig()
  28.             turtle.forward()
  29.             turtle.turnLeft()
  30.             else
  31.             turtle.turnRight()
  32.             turtle.dig()
  33.             turtle.forward()
  34.             turtle.turnRight()
  35.             end
  36.         else
  37.             turtle.turnRight()
  38.         end
  39.     end
  40.  
  41.  
  42. end
  43.  
  44. --Change this for normal deposit once
  45. --I have acquired ender tech
  46. function chestdeposit()
  47. turtle.select(1)
  48. turtle.placeUp()
  49.     local s = 1
  50.         for i = 1, 15, 1 do
  51.             s = s + 1
  52.             turtle.select(s)
  53.             turtle.dropUp()
  54.         end
  55.  
  56.  
  57. end
  58.  
  59. function deposit()
  60.     turtle.placeUp()
  61.     local s = 2
  62.         for i = 1, 13, 1 do
  63.             s = s + 1
  64.             turtle.select(s)
  65.             turtle.dropUp()
  66.         end
  67.     turtle.select(1)
  68.     turtle.digUp()  
  69. end
  70.  
  71. function lavaFuel()
  72.     turtle.select(2)
  73.     turtle.placeUp()
  74.     turtle.select(3)
  75.     turtle.suckUp()
  76.     turtle.refuel()
  77.     turtle.dropUp()
  78.     sleep()
  79.     turtle.suckUp()
  80.     turtle.refuel()
  81.     turtle.dropUp()
  82.     turtle.select(2)
  83.     turtle.digUp()
  84.     turtle.select(1)
  85. end
  86.  
  87. function startPosition()
  88.     turtle.turnLeft()    
  89.         for i = 1, 15, 1 do
  90.             turtle.forward()
  91.         end
  92.     turtle.turnLeft()
  93. end
  94.  
  95. function chunk(y)
  96.     for i = 1, y, 1 do
  97.         layer()
  98.         chestdeposit()
  99.     end
  100. end
  101.  
  102. write("How Many Layers to Remove?")
  103. local y = read()
  104. fuelcheck(y)
  105. print("Removing "..y.." Layers ...")
  106. chunk(y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement