AnonymusHochgenuss

turtledigstraight

Mar 19th, 2026
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local args = { ... }
  2. local distance = tonumber(args[1])
  3.  
  4. if not distance then
  5. print("Nutzung: dig <anzahl>")
  6. return
  7. end
  8.  
  9. print("Grabe " .. distance .. " Bloecke...")
  10.  
  11. for i = 1, distance do
  12. -- Graben, bis der Weg frei ist (für Kies/Sand wichtig)
  13. while turtle.detect() do
  14. turtle.dig()
  15. sleep(0.5)
  16. end
  17.  
  18. -- Vorwärts bewegen
  19. if not turtle.forward() then
  20. -- Falls ein Mob oder Spieler im Weg ist
  21. print("Blockiert bei Schritt " .. i)
  22. break
  23. end
  24. end
  25.  
  26. print("Fertig!")
Advertisement
Add Comment
Please, Sign In to add comment