From 692049a22d284c3aff699810a6a47fbce5e6633c Mon Sep 17 00:00:00 2001 From: brulijam Date: Tue, 18 Jun 2024 19:28:16 +0200 Subject: [PATCH] . --- src/brulijam/t-path-miner.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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