handle empty item slots
This commit is contained in:
parent
76eaf008fb
commit
8536ded85c
@ -1,12 +1,20 @@
|
|||||||
-- vi: ft=lua
|
-- vi: ft=lua
|
||||||
-- Goal: collect lava using buckets in the nether, deposit the buckets into a fluid transposer that extracts the lava and sends it to a power generator
|
-- Goal: collect lava using buckets in the nether, deposit the buckets into a fluid transposer that extracts the lava and sends it to a power generator
|
||||||
|
|
||||||
|
local function compareItemName(target)
|
||||||
|
local itemDetail = turtle.getItemDetail()
|
||||||
|
if itemDetail == nil then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
return itemDetail.name == target
|
||||||
|
end
|
||||||
|
|
||||||
local function isEmptyBucket()
|
local function isEmptyBucket()
|
||||||
return turtle.getItemDetail().name == "minecraft:bucket"
|
compareItemName("minecraft:bucket")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function isLavaBucket()
|
local function isLavaBucket()
|
||||||
return turtle.getItemDetail().name == "minecraft:lava_bucket"
|
compareItemName("minecraft:lava_bucket")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function findFirstEmptyBucket()
|
local function findFirstEmptyBucket()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user