Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- junk = {"granite","andesite","dirt", "stone","gravel","diorite", "grass_block"}
- function valueable()
- if (turtle.inspect()) then
- local success, data = turtle.inspect()
- isJunk = true
- for keys, value in pairs(junk) do
- if (data.name == "minecraft:"..junk[keys]) then
- isJunk = false
- end
- end
- end
- return isJunk
- end
- function checkWalls()
- for i = 1, 4 do
- if (valueable()) then
- turtle.dig()
- end
- turtle.turnRight()
- end
- end
- function mine()
- depth = 0
- while turtle.digDown() do
- turtle.down()
- depth = depth + 1
- checkWalls()
- end
- for i = 1, depth do
- turtle.up()
- end
- turtle.select(16)
- turtle.placeDown()
- end
- function pathing()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- end
- function organize()
- inventory = {}
- for i = 3,16 do
- if (turtle.getItemDetail(i)) then
- data = turtle.getItemDetail(i)
- data["slot"] = i
- end
- end
- end
- function main()
- while true do
- pathing()
- mine()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement