diff --git a/src/brulijam/t-path-miner.lua b/src/brulijam/t-path-miner.lua index 2d8068c..80e1e9c 100644 --- a/src/brulijam/t-path-miner.lua +++ b/src/brulijam/t-path-miner.lua @@ -2,15 +2,17 @@ local function mineStraightLine(length) slot = 1 - turtle.digUp() - turtle.dig() - turtle.forward() - if not turtle.detectDown() - if turtle.getItemCount == 0 then - slot = slot + 1 - turtle.select(slot) + for i=1, length do + turtle.digUp() + turtle.dig() + turtle.forward() + if not turtle.detectDown() then + if turtle.getItemCount == 0 then + slot = slot + 1 + turtle.select(slot) + end + turtle.placeDown() end - turtle.placeDown() end end