yarmoam233

Ore finder

Apr 13th, 2025 (edited)
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | Gaming | 0 0
  1. scanner = peripheral.wrap("back")
  2.  
  3. while true do
  4. term.clear()
  5. term.setCursorPos(1, 1)
  6. blocks, err = scanner.scan(16)
  7. found = false
  8.  
  9. for id, block in pairs(blocks) do
  10.     if block["name"] == "allthemodium:allthemodium_ore" or block["name"] == "allthemodium:allthemodium_slate_ore" then
  11.     found = true
  12.     term.write(block["name"])
  13.     term.write(" at ")
  14.     print(string.format("x:%d z:%d y:%d", block["x"], block["z"], block["y"]))
  15. end
  16. end
  17. if not found then
  18. print("Nothing found")
  19. end
  20. sleep(3)
  21. end
Add Comment
Please, Sign In to add comment