implement returnToBase

This commit is contained in:
Navid Sassan 2023-11-23 01:10:09 +01:00
parent ff2fa97061
commit 573c5f39c0

View File

@ -29,7 +29,10 @@ local function findFirstLavaBucket()
end
local function returnToBase()
print(ForwardCounter)
print('returing to base')
for _ = 1, ForwardCounter do
turtle.back()
end
end
local function despositRefill()
@ -70,6 +73,8 @@ while true do
if compareItemName("minecraft:bucket") then
if turtle.forward() then
ForwardCounter = ForwardCounter + 1
else
returnToBase()
end
end
end