local items = minetest.get_all_craft_recipes(item)[recipe_num].items
local width = minetest.get_all_craft_recipes(item)[recipe_num].width
if width == 0 then width = math.min(3, #items) end
- local rows = math.ceil(table.maxn(items) / width)
+ local rows = math.ceil(table.maxn(items) / width) -- Lua 5.3 removed `table.maxn`, use `xdecor.maxn` in case of failure.
local function is_group(item)
if item:find("^group:") then return "G" end
sounds = def.sounds,
tiles = tiles,
groups = groups,
- node_box = xdecor.pixelnodebox(16, {unpack(d, 3)}),
+ node_box = xdecor.pixelbox(16, {unpack(d, 3)}), -- `unpack` has been changed to `table.unpack` in newest Lua versions.
sunlight_propagates = true,
on_place = minetest.rotate_node,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)