mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-12-28 11:40:24 +01:00
Clean itemname before checking existence (#234)
important when the item string contains metadata
This commit is contained in:
parent
2426b6c912
commit
5d233a0f0a
5
api.lua
5
api.lua
@ -12,8 +12,9 @@ local function is_recipe_craftable(recipe)
|
||||
end
|
||||
else
|
||||
-- Possibly an item
|
||||
if not minetest.registered_items[itemname]
|
||||
or minetest.get_item_group(itemname, "not_in_craft_guide") ~= 0 then
|
||||
local itemname_cleaned = ItemStack(itemname):get_name()
|
||||
if not minetest.registered_items[itemname_cleaned]
|
||||
or minetest.get_item_group(itemname_cleaned, "not_in_craft_guide") ~= 0 then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user