update treeFarmer
This commit is contained in:
parent
337d9c2191
commit
e80c8b7a78
@ -1,3 +1,5 @@
|
|||||||
|
local fallingTreeModUsed = true
|
||||||
|
|
||||||
woodList = {
|
woodList = {
|
||||||
[0] = "minecraft:oak_log",
|
[0] = "minecraft:oak_log",
|
||||||
[1] = "minecraft:dark_oak_log",
|
[1] = "minecraft:dark_oak_log",
|
||||||
@ -59,7 +61,7 @@ local function placeTree()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function emptyWood()
|
local function emptyInventory()
|
||||||
for i=1, 16 do
|
for i=1, 16 do
|
||||||
turtle.select(i)
|
turtle.select(i)
|
||||||
itemDetail = turtle.getItemDetail()
|
itemDetail = turtle.getItemDetail()
|
||||||
@ -73,6 +75,19 @@ local function emptyWood()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
|
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
|
while true do
|
||||||
blockFound, blockData = turtle.inspect()
|
blockFound, blockData = turtle.inspect()
|
||||||
if isWood(blockData) then
|
if isWood(blockData) then
|
||||||
@ -81,8 +96,9 @@ function main()
|
|||||||
placeTree()
|
placeTree()
|
||||||
emptyInventory()
|
emptyInventory()
|
||||||
end
|
end
|
||||||
sleep(10)
|
|
||||||
print("waiting...")
|
print("waiting...")
|
||||||
|
sleep(10)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user