SHOW:
|
|
- or go back to the newest paste.
1 | - | -- pastebin get jZp85wb7 drill |
1 | + | -- pastebin get dNmedzr3 drill |
2 | - | -- pastebin run jZp85wb7 |
2 | + | -- pastebin run dNmedzr3 |
3 | function dig() | |
4 | return turtle.dig() | |
5 | end | |
6 | ||
7 | local blacklist = { | |
8 | "minecraft:stone", | |
9 | - | local drill=true |
9 | + | "minecraft:cobblestone", |
10 | - | local depth=0 |
10 | + | "minecraft:dirt", |
11 | "minecraft:grass", | |
12 | -- and so on | |
13 | } | |
14 | local _blist = {} | |
15 | ||
16 | - | if i >= (depth - (fill+2)) then |
16 | + | |
17 | local fill = 0 | |
18 | local drill = true | |
19 | local depth = 0 | |
20 | ||
21 | -- Inverse blacklist for fast hashmap lookup | |
22 | - | for k=2,16 do |
22 | + | for i = 1, #blacklist do |
23 | - | turtle.select(k) |
23 | + | _blist[blacklist[i]] = true |
24 | - | turtle.drop() |
24 | + | |
25 | ||
26 | ||
27 | while drill do | |
28 | turtle.select(2) | |
29 | temp, data = turtle.inspectDown() | |
30 | if data.name == "minecraft:bedrock" then | |
31 | for i=0,depth-1 do | |
32 | turtle.up() | |
33 | if i >= (depth - (fill)) then | |
34 | turtle.select(2) | |
35 | turtle.placeDown() | |
36 | end | |
37 | - | if block.name == "minecraft:obsidian" then dig() |
37 | + | |
38 | - | elseif block.name == "minecraft:diamond_ore" then dig() |
38 | + | |
39 | - | elseif block.name == "minecraft:diamond_block" then dig() |
39 | + | |
40 | - | elseif block.name == "minecraft:redstone_ore" then dig() |
40 | + | |
41 | - | elseif block.name == "minecraft:lit_redstone_ore" then dig() |
41 | + | |
42 | - | elseif block.name == "minecraft:emerald_ore" then dig() |
42 | + | |
43 | - | elseif block.name == "minecraft:emerald_block" then dig() |
43 | + | |
44 | - | elseif block.name == "minecraft:gold_ore" then dig() |
44 | + | |
45 | - | elseif block.name == "minecraft:iron_ore" then dig() |
45 | + | |
46 | - | elseif block.name == "minecraft:coal_ore" then dig() |
46 | + | |
47 | - | elseif block.name == "minecraft:redstone_block" then dig() |
47 | + | |
48 | - | elseif block.name == "minecraft:quartz_ore" then dig() |
48 | + | |
49 | - | elseif block.name == "minecraft:quartz_block" then dig() |
49 | + | |
50 | - | elseif block.name == "minecraft:diamond_block" then dig() |
50 | + | if _blist[block["name"]] then |
51 | - | elseif block.name == "BiomesOPlenty:gemOre" then dig() |
51 | + | --do nothing |
52 | - | elseif block.name == "IC2:blockOreCopper" then dig() |
52 | + | else |
53 | - | elseif block.name == "IC2:blockOreTin" then dig() |
53 | + | dig() |
54 | - | elseif block.name == "IC2:blockOreUran" then dig() |
54 | + | |
55 | - | elseif block.name == "IC2:blockOreLead" then dig() |
55 | + | |
56 | - | elseif block.name == "TConstruct:SeardBrick" then dig() |
56 | + | |
57 | - | elseif block.name == "TConstruct:GravelOre" then dig() |
57 | + | |
58 | - | elseif block.name == "UndergroundBiomes:igneous_oreRedstone" then dig() |
58 | + |