Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- block = turtle.inspect()
- item = turtle.getItemDetail()
- tunnelLength = 0
- branchLength = 0
- facing = 1
- interval = 0
- select = 1
- endLoop = 0
- function right()
- turtle.turnRight()
- facing = facing + 1
- if facing == 5 then
- facing = 1
- else
- facing = facing
- end
- end
- function left()
- turtle.turnLeft()
- facing = facing - 1
- if facing == 0 then
- facing = 4
- else
- facing = facing
- end
- end
- function turnAround()
- left()
- left()
- sleep(2)
- end
- function Tforward()
- turtle.dig()
- turtle.digUp()
- if turtle.detectDown() == false then
- select = 1
- while turtle.getItemDetail("minecraft:cobblestone") == false do
- turtle.select(select)
- select = select + 1
- if select == 17 then
- select = 1
- end
- turtle.placeDown()
- end
- end
- turtle.forward()
- tunnelLength = tunnelLength + 1
- end
- function Bforward()
- turtle.dig()
- turtle.digUp()
- if turtle.detectDown() == false then
- select = 1
- while turtle.getItemDetail("minecraft:cobblestone") == false do
- turtle.select(select)
- select = select + 1
- if select == 17 then
- select = 1
- end
- end
- turtle.placeDown()
- end
- turtle.forward()
- branchLength = branchLength + 1
- end
- function Treturn()
- while facing ~= 3 do
- right()
- end
- while tunnelLength > 0 do
- tunnelLength = tunnelLength - 1
- turtle.forward()
- end
- end
- function Breturn()
- turnAround()
- while branchLength > 0 do
- branchLength = branchLength - 1
- turtle.forward()
- end
- end
- function comeBack()
- turnAround()
- while branchLength > 0 do
- Breturn()
- end
- while tunnelLength > 0 do
- Treturn()
- end
- end
- function dump()
- for i = 1,16 do
- turtle.select(i)
- turtle.drop()
- end
- end
- while true do
- select = 1
- while turtle.getFuelLevel() < 1024 do
- turtle.refuel(1)
- turtle.select(select)
- select = select + 1
- end
- turnAround()
- turtle.inspect()
- if turtle.inspect("minecraft:chest") then
- print("Found chest")
- else
- print("I will dump here")
- end
- turnAround()
- Tforward(interval)
- right()
- Bforward(30)
- comeBack()
- dump()
- interval = interval + 3
- turnAround()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement