Advertisement
Guest User

Untitled

a guest
Nov 16th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 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.  
  31. for i = 0, arg[1] do
  32. digFront()
  33. turtle.turnLeft()
  34. digFront()
  35. turtle.turnRight()
  36. turtle.turnRight()
  37. turtle.forward()
  38. digFront()
  39. turtle.turnLeft()
  40. turtle.turnLeft()
  41. turtle.forward()
  42. turtle.turnRight()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement