How to determine is a Enderman tower and Zombie Pigman tower ? My server produce lag because him. My idea is to determine the number of mobs in a chunk..
You can use some kind of mob stacking plugin to merge mobs into one but they still give the proper amount of exp/loot
You could probably update the density per loaded chunk on mob spawn and prune whenever the density overshoots a certain threshold...