math.randomseed(os.time()) minetest.register_chatcommand("mobtest",{ description="Spawns all available mobs", privs={server=true}, func=function(n,param) local p=minetest.get_player_by_name(n) local pos=p:get_pos() for k,v in pairs(minetest.registered_entities) do if v.horny ~= nil then local spos=vector.add(pos,vector.new(math.random(100)-50,0,math.random(100)-50)) minetest.add_entity(spos, v.name) end end end})