SHOW:
|
|
- or go back to the newest paste.
1 | -- Only works with advanced peripherals | |
2 | -- Needs the Geo Scanner peripheral | |
3 | local geo = peripheral.wrap("back") | |
4 | ||
5 | print("looking for:") | |
6 | local query = read() | |
7 | ||
8 | function Search() | |
9 | while(true) do | |
10 | ||
11 | local scan = geo.scan(16) | |
12 | if (scan~=nil) then | |
13 | term.setBackgroundColor(colors.white) | |
14 | - | if (block_data.name == "minecraft:diamond_ore" or block_data.name == "minecraft:deepslate_diamond_ore") then |
14 | + | |
15 | paintutils.drawPixel(13,10,colors.black) | |
16 | - | elseif (block_data.name == "minecraft:coal_ore" or block_data.name == "minecraft:deepslate_coal_ore") then |
16 | + | |
17 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.gray) |
17 | + | if (string.find(block_data.name, query) <> nil) then |
18 | - | elseif (block_data.name == "minecraft:iron_ore" or block_data.name == "minecraft:deepslate_iron_ore") then |
18 | + | |
19 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.lightGray) |
19 | + | |
20 | - | elseif (block_data.name == "minecraft:copper_ore" or block_data.name == "minecraft:deepslate_copper_ore") then |
20 | + | |
21 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.brown) |
21 | + | |
22 | - | elseif (block_data.name == "minecraft:gold_ore" or block_data.name == "minecraft:deepslate_gold_ore") then |
22 | + | |
23 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.yellow) |
23 | + | |
24 | - | elseif (block_data.name == "minecraft:redstone_ore" or block_data.name == "minecraft:deepslate_redstone_ore") then |
24 | + | |
25 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.red) |
25 | + | |
26 | - | elseif (block_data.name == "minecraft:deepslate_lapis_ore" or block_data.name == "minecraft:deepslate_lapise_ore") then |
26 | + | |
27 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.blue) |
27 | + | |
28 | - | elseif (block_data.name == "tardis_refined:deepslate_zeiton_ore" or block_data.name == "tardis_refined:deepslate_zeiton_ore" or block_data.name == "tardis:steam_broken_exterior" or block_data.name == "tardis:tt_cap_broken") then |
28 | + | |
29 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.purple) |
29 | + | |
30 | - | elseif (block_data.name == "minecraft:ancient_debris") then |
30 | + | |
31 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.brown) |
31 | + | |
32 | - | elseif (block_data.name == "create_new_age:magnetite_block") then |
32 | + | |
33 | - | PaintOre(block_data.x, block_data.y, block_data.z, colors.pink) |
33 | + | |
34 | Search() |