Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function scan()
- local isDownTrue, dataDown = turtle.inspectDown()
- local isUpTrue, dataUp = turtle.inspectUp()
- local block = "Botania:livingrock"
- if (dataDown.name == block) and (dataUp.name == block) then
- return true
- else
- return false
- end
- end
- function dig()
- turtle.digDown()
- turtle.digUp()
- end
- function place()
- for i=1,16 do
- local data = turtle.getItemDetail(i)
- if type(data) == "nil" then
- else
- if data.name == "minecraft:stone" then
- turtle.select(i)
- turtle.placeUp()
- turtle.placeDown()
- end
- end
- end
- end
- function move()
- isBlock = turtle.detect()
- if isBlock then
- turtle.turnLeft()
- turtle.forward()
- else
- turtle.forward()
- end
- end
- function inventory()
- local rock = "Botania:livingrock"
- local stone = "minecraft:stone"
- local coal = "minecraft:coal"
- for i=1,16 do
- local data = turtle.getItemDetail(i)
- if data.name == rock then
- turtle.select(i)
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.drop()
- turtle.turnLeft()
- turtle.turnLeft()
- elseif data.name == stone then
- elseif data.name == coal then
- end
- end
- while true do
- if scan() == true then
- dig()
- place()
- move()
- else
- --inventory()
- sleep(5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement