Skip to content

Instantly share code, notes, and snippets.

@bigfoot547
Created May 28, 2017 01:53
Show Gist options
  • Save bigfoot547/883f34a8e499f3b3d03cdc2a3e3e2039 to your computer and use it in GitHub Desktop.
Save bigfoot547/883f34a8e499f3b3d03cdc2a3e3e2039 to your computer and use it in GitHub Desktop.
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
end
end
if count >= mobcap then return end -- Replace mobcap with the number of mobs at a time.
@AntumDeluge
Copy link

Small error:
if name = "mobname" then -- Replace mobname with the name of the mob
should be:
if name == "mobname" then -- Replace mobname with the name of the mob

@AntumDeluge
Copy link

Thank you for the help: AntumMT/mod-sneeker@d336800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment