-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrip2.lua
More file actions
32 lines (29 loc) · 905 Bytes
/
strip2.lua
File metadata and controls
32 lines (29 loc) · 905 Bytes
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
-- strip mining program rewritten using my mining lib
local mining = require "mining"
local args = {...}
if not args[1] then
args[1] = 10
end
-- start first strip
for i=1,args[1]+1 do
mining.refuel()
mining.bridge("minecraft:cobblestone") -- run bridge routine
if i%5==0 then mining.deposit(i) end
if i%8==0 then mining.torchBehind() end
mining.forward()
if i%25==0 then print("Mined "..i.." Blocks") end
end
-- turn around and mine over
turtle.turnRight()
for i=1,4 do mining.forward() mining.bridge("minecraft:cobblestone") end
turtle.turnRight()
-- head back
for i=1, args[1]+1 do
mining.refuel()
mining.bridge("minecraft:cobblestone") -- run bridge routine
if i%5==0 then mining.deposit(i) end
if i%8==0 then mining.torchBehind() end
mining.forward()
if i%25==0 then print("Mined "..i.." Blocks") end
end
print("Strip Mining Complete")