From e704ba982f84f15dcc3450a688b209ab30130a74 Mon Sep 17 00:00:00 2001 From: brulijam Date: Mon, 17 Jun 2024 03:40:08 +0200 Subject: [PATCH] . --- src/brulijam/t-farmer.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/brulijam/t-farmer.lua b/src/brulijam/t-farmer.lua index 9bba5ac..8142326 100644 --- a/src/brulijam/t-farmer.lua +++ b/src/brulijam/t-farmer.lua @@ -8,6 +8,12 @@ local toPlant = { [3] = "minecraft:carrot", } +local toCollect = { + [1] = "minecraft:wheat", + [2] = "minecraft:potato", + [3] = "minecraft:carrot", +} + local function doField() turtle.up() @@ -72,6 +78,27 @@ local function kiss() turtle.turnLeft() end end + + -- sort items away + turtle.forward(9) + turtle.turnRight() + turtle.down() + + + --store wheat + for i=1, #toCollect do + turtle.forward() + for j=4, 16 + turtle.select(i) + + itemDetail = turtle.getItemDetail() + if itemDetail ~= nil then + if itemDetail.name == toCollect[i] then + turtle.dropDown() + end + end + end + end end