Advertisement
Post_maphone

latest

Nov 28th, 2020 (edited)
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. function mine(distance)
  2. if distance ~= nil and turtle.getFuelLevel() > (distance*2 + 150) then
  3. distance = tonumber(distance)
  4. for i = 1, distance do
  5. turtle.forward()
  6. while not turtle.detect() do
  7. turtle.dig()
  8. turtle.digUp()
  9. end
  10. end
  11. turtle.turnLeft()
  12. turtle.turnLeft()
  13. for i = 1, distance do
  14. turtle.forward()
  15. end
  16. else
  17. print("add a valid distance or input more coal.")
  18. end
  19. end
  20.  
  21. function Oremining()
  22. a = {"minecraft:stone","minecraft:dirt"}
  23.  
  24. -- for i = 1, table.getn(a) do
  25. -- if turtle.inspect() == a[i] then
  26. -- print("this is either stone or dirt")
  27. -- end
  28. -- end
  29. print(turtle.inspect().name())
  30. end
  31.  
  32. function inspect()
  33.  
  34. local success, data = turtle.inspectUp()
  35.  
  36.  
  37. local success, data = turtle.inspectUp()
  38. if success then
  39. print("Block name: ", data.name)
  40. print("Block metadata: ", data.metadata)
  41. end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement