bootscreen

Sus scanner

Jul 20th, 2024
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. scanner = peripheral.wrap("back")
  2.  
  3. while true do
  4. term.clear()
  5. term.setCursorPos(1, 1)
  6. blocks, err = scanner.scan(160)
  7. found = false
  8.  
  9. for id, block in pairs(blocks) do
  10.     if block["name"] == "minecraft:suspicious_sand" or block["name"] == "minecraft:suspicious_gravel" or block["name"] == "allthemodium:suspicious_soul_sand" then
  11.     found = true
  12.     term.setTextColor(color.green)
  13.     term.write(block["name"])
  14.     term.setTextColor(color.white)
  15.     term.write(" at ")
  16.     term.setTextColor(color.blue)
  17.     print(string.format("x:%d z:%d y:%d", block["x"], block["z"], block["y"]))
  18. end
  19. end
  20. if not found then
  21. print("Nothing found")
  22. end
  23. sleep(5)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment