updated treeFarmer
This commit is contained in:
parent
cff591f562
commit
0fb089db5e
@ -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,14 +98,18 @@ function main()
|
||||
else
|
||||
while true do
|
||||
blockFound, blockData = turtle.inspect()
|
||||
if isWood(blockData) then
|
||||
recursiveTreeFarming()
|
||||
sleep(1)
|
||||
if blockFound then
|
||||
if isWood(blockData) then
|
||||
recursiveTreeFarming()
|
||||
sleep(1)
|
||||
placeTree()
|
||||
emptyInventory()
|
||||
end
|
||||
print("waiting...")
|
||||
sleep(10)
|
||||
else
|
||||
placeTree()
|
||||
emptyInventory()
|
||||
end
|
||||
print("waiting...")
|
||||
sleep(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user