Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
local name, count
for name in pairs(minetest.luaentities) do
if name == "mobname" then -- Replace mobname with the name of the mob
count = count + 1
if count >= mobcap then return end -- Replace mobcap with the number of mobs at a time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment