Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --coal in slot2, cobble in 1
- --BmGxztNt
- width = 14-1
- junk_blocks = "minecraft:cobblestone minecraft:dirt minecraft:gravel chisel:limestone chisel:marble"
- function buildWall(func)
- if turtle.getItemCount(1) > 1 then
- return func()
- end
- return true
- end
- function clearLava(func)
- if turtle.getItemCount(1) > 1 then
- return func()
- end
- return true
- end
- turtle.turnLeft()
- while true do
- --refueling
- turtle.select(2)
- while turtle.getFuelLevel() < 256 do
- if turtle.getItemCount(2) > 1 then
- turtle.refuel(1)
- end
- sleep(0.5)
- end
- turtle.select(1)
- --clear inventory
- local lastSlot = 3
- local slot = 3
- for slot = 16, 3, -1 do
- if turtle.getItemCount(slot) > 0 then
- lastSlot = slot
- break
- end
- end
- while slot < lastSlot do
- turtle.select(slot)
- data = turtle.getItemDetail(slot)
- if turtle.compareTo(1) or (data and junk_blocks:find(data.name)) then
- turtle.drop()
- turtle.select(lastSlot)
- turtle.transferTo(slot)
- lastSlot = lastSlot - 1
- slot = slot - 1
- end
- slot = slot + 1
- end
- while turtle.getItemCount(16) > 0 do
- sleep(1)
- end
- turtle.select(1)
- --tunnel bore
- for x = 1, width do
- turtle.digDown()
- buildWall(turtle.placeDown)
- clearLava(turtle.placeUp)
- turtle.digUp()
- repeat turtle.dig() until turtle.forward()
- end
- turtle.digDown()
- buildWall(turtle.placeDown)
- clearLava(turtle.placeUp)
- turtle.digUp()
- turtle.dig()
- buildWall(turtle.place)
- repeat turtle.digUp() until turtle.up()
- turtle.dig()
- buildWall(turtle.place)
- repeat turtle.digUp() until turtle.up()
- turtle.dig()
- buildWall(turtle.place)
- repeat turtle.digUp() until turtle.up()
- turtle.dig()
- buildWall(turtle.place)
- turtle.turnRight()
- turtle.turnRight()
- for x = 1, width do
- repeat turtle.digUp() until buildWall(turtle.placeUp)
- clearLava(turtle.placeDown)
- turtle.digDown()
- repeat turtle.dig() until turtle.forward()
- end
- repeat turtle.digUp() until buildWall(turtle.placeUp)
- clearLava(turtle.placeDown)
- turtle.digDown()
- turtle.dig()
- buildWall(turtle.place)
- repeat turtle.digDown() until turtle.down()
- turtle.dig()
- buildWall(turtle.place)
- repeat turtle.digDown() until turtle.down()
- turtle.dig()
- buildWall(turtle.place)
- repeat turtle.digDown() until turtle.down()
- turtle.dig()
- buildWall(turtle.place)
- turtle.turnLeft()
- repeat turtle.dig() until turtle.forward()
- turtle.turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment