Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local h = 1
- local fuelSlot = 1
- local stonePlace = 5
- local glassPlace = 9
- local blanks = 0
- function filler()
- if turtle.getFuelLevel()<10 then
- turtle.select(fuelSlot)
- turtle.refuel(1)
- end
- if turtle.getItemCount(stonePlace)<2 then
- stonePlace = stonePlace + 1
- end
- if turtle.getItemCount(glassPlace )<2 then
- glassPlace = glassPlace + 1
- end
- function digMove()
- turtle.down()
- turtle.digDown()
- end
- function digToBedrock()
- turtle.digDown()
- while not turtle.detectDown() do
- filler()
- digMove()
- end
- end
- function checkForward()
- turtle.select(glassPlace)
- if (not turtle.detect()) or (turtle.compare()) then
- blanks = blanks + 1
- end
- end
- function placeWhat()
- blanks = 0
- checkForward()
- turtle.turnLeft()
- checkForward()
- turtle.turnRight()
- turtle.turnRight()
- checkForward()
- turtle.turnLeft()
- if (blanks == 0) then
- turtle.select(stonePlace)
- else
- turtle.select(glassPlace)
- end
- end
- function movePlace()
- if turtle.up() then
- turtle.placeDown()
- h = h + 1
- else
- turtle.digUp()
- end
- end
- function run()
- digToBedrock()
- while h < 123 do
- filler()
- if h < 70 then
- placeWhat()
- else
- turtle.select(stonePlace)
- end
- movePlace()
- end
- end
- run()
Advertisement
Add Comment
Please, Sign In to add comment