-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathturt2.lua
More file actions
61 lines (61 loc) · 1.52 KB
/
Copy pathturt2.lua
File metadata and controls
61 lines (61 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
local blacklist = {
["minecraft:cobblestone"] = true,
["minecraft:stone"] = true,
["minecraft:gravel"] = true
}
local function other()
while true do
for i=1,16 do
local detail = turtle.getItemDetail(i)
if detail and blacklist[detail.name] then
turtle.select(i)
turtle.drop()
end
end
sleep()
if turtle.getFuelLevel() <= 10 then
print("Out of fuel")
while true do
for i=1,16 do
turtle.select(i)
turtle.refuel()
end
if turtle.getFuelLevel() > 10 then
print("Refueled.")
break
else
print("Please put fuel in the turtles inventory and press a key.")
os.pullEvent("key")
end
end
end
end
end
local function dig()
while true do
other()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnRight()
turtle.turnRight()
turtle.forward()
turtle.forward()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.digDown()
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
sleep()
end
end
dig()