updated treeFarmer

This commit is contained in:
Julian Brammer 2024-06-02 17:20:17 +02:00
parent cff591f562
commit 0fb089db5e

View File

@ -51,7 +51,7 @@ local function placeTree()
local itemDetail = turtle.getItemDetail()
if itemDetail ~= nil then
if itemDetail.name == "minecraft:oak_sapling" then
if itemDetail.name == "minecraft:spruce_sapling" then
local blockFound, blockData = turtle.inspect()
if not blockFound then
turtle.up()
@ -74,7 +74,7 @@ local function emptyInventory()
turtle.select(i)
itemDetail = turtle.getItemDetail()
if itemDetail ~= nil then
if itemDetail.name == "minecraft:oak_log" then
if itemDetail.name == "minecraft:spruce_log" then
turtle.refuel()
turtle.dropDown()
end
@ -98,6 +98,7 @@ function main()
else
while true do
blockFound, blockData = turtle.inspect()
if blockFound then
if isWood(blockData) then
recursiveTreeFarming()
sleep(1)
@ -106,6 +107,9 @@ function main()
end
print("waiting...")
sleep(10)
else
placeTree()
end
end
end
end