Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local list = minetest.env:get_objects_in_radius(pos, 20);
- local count = #list;
- local MAX_ENTS = 15;
- if (count > MAX_ENTS) then
- for i = (MAX_ENTS + 1), count do
- list[i]:remove();
- end
- end
- check list[i]:get_name() ~= "peaceful_npc:npc"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement