fix
This commit is contained in:
parent
290be13b00
commit
00d19a5e08
@ -9,18 +9,10 @@ local function compareItemName(target)
|
|||||||
return itemDetail.name == target
|
return itemDetail.name == target
|
||||||
end
|
end
|
||||||
|
|
||||||
local function isEmptyBucket()
|
|
||||||
return compareItemName("minecraft:bucket")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function isLavaBucket()
|
|
||||||
return compareItemName("minecraft:lava_bucket")
|
|
||||||
end
|
|
||||||
|
|
||||||
local function findFirstItem(target)
|
local function findFirstItem(target)
|
||||||
for i=1,16 do
|
for i=1,16 do
|
||||||
turtle.select(i)
|
turtle.select(i)
|
||||||
if compareItemName() then
|
if compareItemName(target) then
|
||||||
print('Found an target item (' .. target .. ') in slot ' .. i)
|
print('Found an target item (' .. target .. ') in slot ' .. i)
|
||||||
return i
|
return i
|
||||||
end
|
end
|
||||||
@ -77,7 +69,7 @@ while true do
|
|||||||
turtle.select(bucket)
|
turtle.select(bucket)
|
||||||
-- try to fill it
|
-- try to fill it
|
||||||
turtle.placeDown()
|
turtle.placeDown()
|
||||||
if isEmptyBucket() then
|
if compareItemName("minecraft:bucket") then
|
||||||
if turtle.forward() then
|
if turtle.forward() then
|
||||||
ForwardCounter = ForwardCounter + 1
|
ForwardCounter = ForwardCounter + 1
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user