minetest.env = {} setmetatable(minetest.env, { __index = function(table, key) local func = minetest[key] if type(func) == 'function' then rawset(table, key, function(self, ...) return func(unpack(arg)) end) else rawset(table, key, nil) end return rawget(table, key) end })