Mob Limits - darkhelmet-gaming/dhmc GitHub Wiki

For performance reasons, we have a tool that limits the size of mob groups. "Groups" are tricky because their area doesn't matter - people assume we limit x number of mobs per chunk but it's per group. A group is formed when any mob is within a defined distance of any other member in that group.

Think of it like a connect-the-dots chain. Say we have defined a group for "sheep" and a group distance of 1 - we begin at one sheep, we look around it for any other sheep that are within 2 "meters". This is a radius, not a 2 block area. If we find a second sheep, they are grouped together (call it group "A"). If there's a third sheep within 2 meters of that second sheep, it will also be grouped in group "A".

The limit applies when too many mobs are part of that group. For sheep, it's 16 per group. If you have 16 sheep pens, and you keep a fence between them, it's enough to separate their groups.

Group Limits

  • Default (all mobs): group-distance=3, max-amount=50
  • Zombie, Zombified Piglin: group-distance=5, max-amount=10
  • Pig, Cow, Chicken, Horse, Llama: group-distance=3, max-amount=35
  • Bee: group-distance=2, max-amount=35
  • Skeleton, Spider, Cave Spider: group-distance=1, max-amount=10