From a643feafd9c30ca91765f3a7d4f85e7df0809494 Mon Sep 17 00:00:00 2001 From: Jacob Babor Date: Fri, 1 Dec 2023 17:00:25 -0600 Subject: [PATCH] Have thing cleanup --- stoneblock-3-chicken-breeder/betterbreeder.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stoneblock-3-chicken-breeder/betterbreeder.lua b/stoneblock-3-chicken-breeder/betterbreeder.lua index cb8c22b..e31f8f8 100644 --- a/stoneblock-3-chicken-breeder/betterbreeder.lua +++ b/stoneblock-3-chicken-breeder/betterbreeder.lua @@ -8,6 +8,7 @@ function placeBreeder() -- Check to see if this iteration obtained a new chicken if turtle.suckUp() then -- Then, we destroy the breeder + print('Placing breeder with new chicken') turtle.select(2) turtle.digUp() -- We are now in a position where we have: @@ -21,6 +22,7 @@ function placeBreeder() turtle.dropDown(1) else -- Just pop the breeder for consistency + print('Placing breeder from scratch') turtle.select(2) turtle.digUp() end @@ -92,6 +94,16 @@ function checkIfDone() return false end +function cleanup() + print('Cleaning up...') + turtle.digUp() + for i = 1, 16, 1 do + turtle.select(i) + turtle.dropDown() + end + print('Cleanup complete') +end + local function main() print('Initializing...') while not checkIfDone() do