TechManDylan

CobbleGenBuilder

Jan 2nd, 2021 (edited)
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.37 KB | None | 0 0
  1. local bMined = 0
  2. function turtleBuildCobbleGen()
  3.     term.clear()
  4.     term.setCursorPos(1,1) 
  5.     print("Building Cobble Generator")
  6.     if turtle.getFuelLevel() < 5 then
  7.     getFuel()
  8.    
  9. end
  10.     turtle.select(3)
  11.     turtle.up()
  12.     turtle.placeDown()
  13.     turtle.place()
  14.     turtle.turnLeft()
  15.     turtle.place()
  16.     turtle.turnLeft()
  17.     turtle.place()
  18.     turtle.turnLeft()
  19.     turtle.forward()
  20.     turtle.placeDown()
  21.     turtle.turnLeft()
  22.     turtle.place()
  23.     turtle.turnRight()
  24.     turtle.forward()
  25.     turtle.placeDown()
  26.     turtle.place()
  27.     turtle.turnLeft()
  28.     turtle.place()
  29.     turtle.turnLeft()
  30.     turtle.place()
  31.     turtle.turnLeft()
  32.     turtle.place()
  33.     turtle.turnLeft()
  34.     turtle.up()
  35.     turtle.forward()
  36.     turtle.placeDown()
  37.     turtle.place()
  38.     turtle.turnLeft()
  39.     turtle.place()
  40.     turtle.turnRight()
  41.     turtle.turnRight()
  42.     turtle.place()
  43.     turtle.up()
  44.     turtle.turnRight()
  45.     turtle.select(1)
  46.     turtle.placeDown()
  47.     turtle.forward()
  48.     turtle.forward()
  49.     turtle.forward()
  50.     turtle.down()
  51.     turtle.select(2)
  52.     turtle.placeDown()
  53.     turtle.turnLeft()
  54.     turtle.forward()
  55.     turtle.turnLeft()
  56.     turtle.forward()
  57.     turtle.turnLeft()
  58.     turtle.down()
  59.     turtle.select(15)
  60.     turtle.placeDown()
  61.     turtle.select(1)
  62.     turtle.dropUp()
  63.     turtle.select(2)
  64.     turtle.dropUp()
  65.     turtle.select(1)
  66.    
  67. end
  68.  
  69. function getFuel()
  70.     turtle.select(16)
  71.     turtle.digUp()      
  72.     turtle.placeUp()
  73.     turtle.select(1)
  74.     turtle.suckUp(1)
  75.     turtle.refuel()
  76.     turtle.select(16)
  77.     turtle.digUp()
  78. end
  79.  
  80. function cobbleMiner()
  81.     turtle.select(1)
  82.     while true do
  83.     bMined = bMined + 1
  84.     term.clear()
  85.     term.setCursorPos(1,1) 
  86.     print("Mined " .. bMined .. " Cobblestone" )
  87.     turtle.dig()
  88.     turtle.dropDown()
  89.     sleep(1)
  90. end
  91. end
  92.  
  93. function turtleReadyCobbleGen()
  94.     term.clear()
  95.     term.setCursorPos(1,1) 
  96.     print("Please place the following items in these slots.")
  97.     print("This goes from left to right. Top to bottom.")
  98.     print("Slot #1 Lava Bucket")
  99.     print("Slot #2 Water Bucket")
  100.     print("Slot #3 14 Blocks of your choice")
  101.     print("Slot #15 Cobble designated Ender Chest")
  102.     print("Slot #16 Coal designated Ender Chest")
  103.     print("Press enter to continue.")
  104.    
  105.     local readyToBuildCobbleGen = io.read()
  106.    
  107.     if readyToBuildCobbleGen == null then  
  108.    
  109.     turtleBuildCobbleGen()
  110.    
  111.     else
  112.    
  113.     turtleBuildCobbleGen()
  114.    
  115. end
  116. end
  117.  
  118. turtleReadyCobbleGen()
  119. cobbleMiner()
  120.  
  121.  
  122.  
  123. --20 Cobble per Wall layers. 50 for roof.
  124. --22 Cobble per  first 3 Tower layers. 28 following Tower layers
  125.  
Add Comment
Please, Sign In to add comment