feat(turtle-utils): add isFuelItem
This commit is contained in:
parent
fd72a34ecb
commit
2ee725388a
@ -2,6 +2,18 @@ local turtleUtils = {}
|
|||||||
|
|
||||||
local DEFAULT_IDLE_TIME = 2
|
local DEFAULT_IDLE_TIME = 2
|
||||||
|
|
||||||
|
turtleUtils.isFuelItem = function(item)
|
||||||
|
item = item or {}
|
||||||
|
|
||||||
|
-- TODO: silent gear coal
|
||||||
|
if item.name == 'minecraft:stick' or item.name == 'minecraft:coal_coke_block' or item.name == 'immersiveengineering:coke' or item.name == 'silentgear:netherwood_charcoal' or item.name == 'silentgear:netherwood_charcoal_block' then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local tags = item.tags or {}
|
||||||
|
return tags['minecraft:coals'] or tags['minecraft:logs'] or tags['minecraft:planks'] or tags['minecraft:saplings'] or false
|
||||||
|
end
|
||||||
|
|
||||||
turtleUtils.getInventory = function(side)
|
turtleUtils.getInventory = function(side)
|
||||||
side = side or 'front'
|
side = side or 'front'
|
||||||
local inv = peripheral.wrap(side)
|
local inv = peripheral.wrap(side)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user