This commit is contained in:
Julian Brammer 2024-06-17 03:12:54 +02:00
parent 06d793d43c
commit 1d8031b609

View File

@ -8,23 +8,6 @@ local toPlant = {
[3] = "minecraft:carrot", [3] = "minecraft:carrot",
} }
function selectSeed()
for i=1, 16 do
turtle.select(i)
itemDetail = turtle.getItemDetail()
currentSeed = currentSeed + 1
if currentSeed > 4 then
currentSeed = 1
end
if itemDetail ~= nil then
if itemDetail.name == toPlant[currentSeed] then
return
end
end
end
print("No seeds left")
end
local function doField() local function doField()
turtle.up() turtle.up()
@ -72,7 +55,8 @@ local function kiss()
turtle.forward() turtle.forward()
turtle.digDown() turtle.digDown()
turtle.suckDown() turtle.suckDown()
selectSeed() turtle.select(currentSeed)
currentSeed = currentSeed + 1
turtle.placeDown() turtle.placeDown()
end end
if i%2==1 then if i%2==1 then