From dbd2687ffef49000609d5f8b41ac190afea1b11d Mon Sep 17 00:00:00 2001 From: Kai Vogelgesang Date: Sat, 11 Jul 2020 23:45:27 +0200 Subject: [PATCH] Fix wood farmers becoming stuck in trees --- kai/woodfarm.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kai/woodfarm.lua b/kai/woodfarm.lua index ee44345..1ed32f4 100644 --- a/kai/woodfarm.lua +++ b/kai/woodfarm.lua @@ -169,7 +169,10 @@ local state_machine = { ["FINALIZE_TREE"] = function() -- make sure we are directly above the sapling target while T.state.y > 0 do - T.down() + while not T.down() do + -- another tree might have spawned leaves below us + turtle.digDown() + end end turtle.select(SAP_SLOT)