Guest User

Untitled

a guest
Nov 16th, 2019
93
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local arg = { ... }
  2.  
  3. function handleLava( isUp )
  4. local iSuccess, iData
  5. if isUp then
  6. iSuccess, iData = turtle.inspectUp()
  7. if iSuccess then
  8. if iData == "minecraft:lava" then
  9. turtle.select(1)
  10. turtle.placeUp()
  11. end
  12. end
  13. else
  14. iSuccess, iData = turtle.inspect()
  15. if iSuccess then
  16. if iData == "minecraft:lava" then
  17. turtle.select(1)
  18. turtle.place()
  19. end
  20. end
  21. end
  22. end
  23.  
  24. function digFront()
  25. turtle.dig()
  26. turtle.forward()
  27. turtle.digUp()
  28. turtle.up()
  29. turtle.down()
  30. end
  31.  
  32. function checkFront()
  33. handleLava(false)
  34. turtle.up()
  35. handleLava(false)
  36. handleLava(true)
  37. turtle.down()
  38. end
  39.  
  40. for i = 0, arg[1] do
  41. digFront()
  42. checkFront()
  43. turtle.turnLeft()
  44. digFront()
  45. checkFront()
  46. turtle.turnRight()
  47. checkFront()
  48. turtle.turnRight()
  49. turtle.forward()
  50. digFront()
  51. checkFront()
  52. turtle.turnLeft()
  53. checkFront()
  54. turtle.turnLeft()
  55. turtle.forward()
  56. turtle.turnRight()
  57. end
RAW Paste Data