Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  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. end
  38.  
  39. for i = 0, arg[1] do
  40. digFront()
  41. checkFront()
  42. turtle.turnLeft()
  43. digFront()
  44. checkFront()
  45. turtle.turnRight()
  46. checkFront()
  47. turtle.turnRight()
  48. turtle.forward()
  49. digFront()
  50. checkFront()
  51. turtle.turnLeft()
  52. checkFront()
  53. turtle.turnLeft()
  54. turtle.forward()
  55. turtle.turnRight()
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement