Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- distance = 62;
- function turtle.forwards(numForw)
- for i = 1, numForw do
- turtle.forward()
- end
- end
- function turtle.upwards(numUpw)
- for i = 1, numUpw do
- turtle.up()
- end
- end
- function turtle.downwards(numDownw)
- for i = 1, numDownw do
- turtle.down()
- end
- end
- function turtle.turns180()
- for i = 1, 2 do
- turtle.turnRight()
- end
- end
- function scanDown()
- if turtle.detectDown() then
- turtle.digDown()
- end
- end
- function scan()
- if turtle.detect() then
- turtle.dig()
- end
- end
- function emptyInventory()
- turtle.select(1)
- for i = 1, 16 do
- turtle.select(i)
- turtle.drop()
- end
- end
- function mining()
- for i = 1, distance do
- turtle.turnRight()
- scan();
- turtle.turns180()
- scan();
- turtle.turnRight()
- scanDown();
- turtle.down()
- i = i + 1;
- end
- for i = 1, distance do
- turtle.up()
- i = i + 1;
- end
- end
- function selectCobblestone()
- for i = 1, 16 do
- local itemDetail = turtle.getItemDetail(i)
- if itemDetail and itemDetail.name == "minecraft:cobblestone" then
- turtle.select(i)
- break
- end
- end
- end
- function fillFloor()
- selectCobblestone()
- turtle.placeDown()
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown()
- turtle.turns180()
- turtle.forwards(2)
- turtle.placeDown()
- turtle.turns180()
- turtle.forward()
- turtle.turnRight()
- end
- function mining3by3()
- turtle.select(1)
- mining()
- fillFloor()
- turtle.forward()
- mining()
- fillFloor()
- turtle.forward()
- mining()
- fillFloor()
- turtle.turns180()
- turtle.forwards(2)
- emptyInventory()
- turtle.turns180()
- end
- mining3by3()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement