Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- state = turtle.detect()
- local searchedBlock = "minecraft:diamond_ore"
- function Fackel()
- turtle.select(2)
- turtle.placeUp()
- end
- function fDown()
- turtle.digDown()
- turtle.down()
- end
- function UmschauenUpDown()
- success, data = turtle.inspectUp()
- if data.name == searchedBlock then
- turtle.digUp()
- end
- success, data = turtle.inspectDown()
- if data.name == searchedBlock then
- turtle.digDown()
- end
- end
- function Umschauen()
- for i=1, 4 do
- turtle.turnLeft()
- success, data = turtle.inspect()
- if data.name == searchedBlock then
- turtle.dig()
- end
- end
- function Ausheben()
- for u=1, 4 do
- turtle.forward()
- Umschauen()
- UmschauenUpDown()
- turtle.back()
- end
- end
- end
- for p=1,10 do
- fDown()
- Umschauen()
- if state == false then
- Ausheben()
- else Fackel()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement