mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
Add mcl_util.is_fuel
This commit is contained in:
parent
93cbabc61e
commit
649fca5aff
1 changed files with 6 additions and 0 deletions
|
@ -188,3 +188,9 @@ function mcl_util.get_first_occupied_inventory_slot(inventory, listname)
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Returns true if item (itemstring or ItemStack) can be used as a furnace fuel.
|
||||||
|
-- Returns false otherwise
|
||||||
|
function mcl_util.is_fuel(item)
|
||||||
|
return minetest.get_craft_result({method="fuel", width=1, items={item}}).time ~= 0
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue