Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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()
- 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()
- a = {"minecraft:stone","minecraft:dirt"}
- -- for i = 1, table.getn(a) do
- -- if turtle.inspect() == a[i] then
- -- print("this is either stone or dirt")
- -- end
- -- end
- print(turtle.inspect().name())
- end
- function inspect()
- local success, data = turtle.inspectUp()
- local success, data = turtle.inspectUp()
- if success then
- print("Block name: ", data.name)
- print("Block metadata: ", data.metadata)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement