update treeFarmer

This commit is contained in:
Julian Brammer 2024-06-02 16:37:22 +02:00
parent 337d9c2191
commit e80c8b7a78

View File

@ -1,3 +1,5 @@
local fallingTreeModUsed = true
woodList = {
[0] = "minecraft:oak_log",
[1] = "minecraft:dark_oak_log",
@ -59,7 +61,7 @@ local function placeTree()
end
end
local function emptyWood()
local function emptyInventory()
for i=1, 16 do
turtle.select(i)
itemDetail = turtle.getItemDetail()
@ -73,16 +75,30 @@ local function emptyWood()
end
function main()
while true do
blockFound, blockData = turtle.inspect()
if isWood(blockData) then
recursiveTreeFarming()
sleep(1)
placeTree()
emptyInventory()
if fallingTreeModUsed then
while true do
blockFound, blockData = turtle.inspect()
if isWood(blockData) then
turtle.dig()
sleep(1)
placeTree()
emptyInventory()
end
print("waiting for tree...")
sleep(10)
end
else
while true do
blockFound, blockData = turtle.inspect()
if isWood(blockData) then
recursiveTreeFarming()
sleep(1)
placeTree()
emptyInventory()
end
print("waiting...")
sleep(10)
end
sleep(10)
print("waiting...")
end
end