From 9770321c20bce351d6c7d6c34e84a07ed8f9f6db Mon Sep 17 00:00:00 2001 From: Guillaume ARM Date: Sun, 19 May 2024 17:20:44 +0200 Subject: [PATCH] fix(inferium-harvester): bug on harvest procedure --- inferium-harvester.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/inferium-harvester.lua b/inferium-harvester.lua index b0ad8fa..2d54a2f 100644 --- a/inferium-harvester.lua +++ b/inferium-harvester.lua @@ -5,7 +5,7 @@ local config = { local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2 -local VERSION = "0.1.3" +local VERSION = "0.1.4" local IDLE_TIME = 2 local turtleUtils = require('libs/turtle-utils') @@ -112,7 +112,7 @@ local function goToHarvestPoint() end local function goBackToHome() - for i=1, config.firstCropZ - 1, 1 do + for i=1, config.firstCropZ, 1 do turtle.forward() end end @@ -143,7 +143,10 @@ end local function harvestProcedure() for i=1, config.length, 1 do harvestDown() - forward() + + if i ~= config.length then + forward() + end end turtle.turnLeft() @@ -151,7 +154,10 @@ local function harvestProcedure() for i=1, config.length, 1 do harvestDown() - forward() + + if i ~= config.length then + forward() + end end end