local p = peripheral.wrap"back" assert(p.hasModule"plethora:scanner" and p.hasModule"plethora:glasses", "need block scanner and overlay glasses!") local interesting_blocks = { ["minecraft:nether_quartz_ore"] = 0xffffffff, ["minecraft:nether_gold_ore"] = 0xffff00ff, ["minecraft:chest"] = 0x00ff00ff, ["minecraft:cobblestone"] = 0x00cc00aa, ["minecraft:ancient_debris"] = 0x00ff00ff, ["minecraft:budding_amethyst"] = 0xff00ffff, } for k,v in pairs{ coal=0xaaaaaaaa, iron=0xbbbb33ff, copper=0x33bb33ff, gold=0xffff00ff, redstone=0xff0000ff, emerald=0x007700ff, lapis=0x0000ffff, diamond=0x00ffffff, } do interesting_blocks["minecraft:"..k.."_ore"] = v interesting_blocks["minecraft:deepslate_"..k.."_ore"] = v end p.canvas3d().clear() local canvas = p.canvas3d().create() local function go() canvas.clear() canvas.recenter() local scan = p.scan() for _, block in ipairs(scan) do local colour = interesting_blocks[block.name] if colour then local box = canvas.addBox(block.x,block.y,block.z, 0.8,0.8,0.8, colour) box.setDepthTested(false) end end end while true do go() os.sleep(0.5) end