fix non-showign recipes

This commit is contained in:
Tai @ Flex 2016-12-22 19:53:34 +00:00
parent d0b3cf2887
commit a4f9f408ce

View File

@ -335,8 +335,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
data.pagenum = data.pagemax
end
craftguide:get_formspec(player_name)
elseif next(fields):find(":") then
local item = next(fields)
else
for item,_ in pairs(fields) do
if item:find(":") then
if item:sub(-4) == "_inv" then
item = item:sub(1,-5)
end
@ -360,6 +361,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
data.recipes_item = recipes
craftguide:get_formspec(player_name, is_fuel)
end
end
end
end)
minetest.register_craftitem("craftguide:book", {