Reskatron

cobble get

Jun 26th, 2024
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | Gaming | 0 0
  1. -- Function to check and mine the block in front of the turtle
  2. function detectAndMine()
  3. -- Check if there is a block in front of the turtle
  4. if turtle.detect() then
  5. -- There is a block, mine it
  6. turtle.dig()
  7. print("Block detected and mined.")
  8. else
  9. -- No block detected
  10. print("No block detected.")
  11. end
  12. end
  13.  
  14. -- Call the function to perform the detection and mining
  15. detectAndMine()
Advertisement
Add Comment
Please, Sign In to add comment