Advertisement
Blackhome

LavaLoader

Jan 6th, 2025 (edited)
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | Gaming | 0 0
  1. --distance for loading
  2. distance = ...
  3. if distance then
  4.     distance = tonumber(distance)
  5. else
  6.     distance = 35
  7. end
  8.  
  9. --Counter for found lava springs
  10. lavaCnt = {0}
  11.  
  12. local move = require("move")
  13. local inspect = require("inspect")
  14. local collectLava = require("collectLava")
  15.  
  16. lavaArray = {"minecraft:lava"}
  17.  
  18. -- mines one tunnel and comes back out
  19. function mineTunnel (remainingLength)
  20.     if not (remainingLength == 0) then
  21.         move.Forward()
  22.         if  inspect.Down(lavaArray) then
  23.             collectLava.Bottom(lavaCnt)
  24.         end
  25.         mineTunnel(remainingLength - 1)
  26.         move.Forward()
  27.     else
  28.         move.turnBack()
  29.     end
  30. end
  31.  
  32. mineTunnel(distance)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement