Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- local distance = ...
- -- if distance ~= nil then
- -- distance = tonumber(distance)
- -- for i = 1, distance do
- -- turtle.forward()
- -- while not turtle.forward() do
- -- turtle.dig()
- -- end
- -- end
- -- else
- -- print("you didn't specify a distance.")
- -- end
- function mine(distance)
- if distance ~= nil and turtle.getFuelLevel() > (distance*2 + 150) then
- distance = tonumber(distance)
- for i = 1, distance do
- turtle.forward()
- while not turtle.detect() do
- turtle.dig()
- turtle.digUp()
- turtle.turnLeft()
- if look() == true then
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.back()
- turtle.turnRight()
- end
- end
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1, distance do
- turtle.forward()
- end
- else
- print("add a valid distance or input more coal.")
- end
- end
- function Oremining()
- end
- function inspect()
- local success, data = turtle.inspect()
- if success then
- return data.name
- end
- end
- function look()
- a = {"minecraft:stone","minecraft:dirt"}
- for i = 0, table.getn(a) do
- if (inspect() == a[i]) then
- local ore = inspect().data.name
- return false
- else return true
- end
- end
- end
- function mineOre()
- local ore = look().inspect().data.name
- print(ore)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement