Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scanner = peripheral.wrap("back")
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- blocks, err = scanner.scan(160)
- found = false
- for id, block in pairs(blocks) do
- if block["name"] == "minecraft:suspicious_sand" or block["name"] == "minecraft:suspicious_gravel" or block["name"] == "allthemodium:suspicious_soul_sand" then
- found = true
- term.setTextColor(color.green)
- term.write(block["name"])
- term.setTextColor(color.white)
- term.write(" at ")
- term.setTextColor(color.blue)
- print(string.format("x:%d z:%d y:%d", block["x"], block["z"], block["y"]))
- end
- end
- if not found then
- print("Nothing found")
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment