Skip to main content
← All Guides
Performance · 5 min read

How to Limit Entity Counts Per Chunk

Set per-chunk entity caps to prevent lag from mob farms, villager halls, and item drops. Learn how to limit entity count per chunk minecraft servers support.

Why Entity Density Matters

Every loaded entity in Minecraft costs server tick time. Mobs run AI and pathfinding, item entities check for merging and pickup, vehicles process physics, and experience orbs calculate collection. When hundreds of entities concentrate in a single 16x16 chunk, the server spends a disproportionate amount of time on that one chunk. Mob farms, item sorters with overflow, broken spawner setups, and villager breeding gone wrong are all common causes. Being able to limit entity count per chunk minecraft servers process is one of the most direct ways to prevent localized lag from spreading server-wide.

Paper's Built-in Entity Settings

Paper offers several entity-related settings in paper-world-defaults.yml and spigot.yml that help control density, though not all of them are strict per-chunk limits:

# paper-world-defaults.yml
entities:
  spawning:
    per-player-mob-spawns: true
    despawn-ranges:
      monster:
        soft: 28
        hard: 96
      creature:
        soft: 28
        hard: 96
      misc:
        soft: 28
        hard: 96

The despawn ranges control how far from a player entities can exist. Setting a hard despawn range of 96 blocks (instead of the vanilla 128) means mobs further than 96 blocks from any player are instantly removed. This indirectly limits entity count per chunk minecraft servers maintain by reducing the total number of entities that can exist at any time. The soft range (28 blocks) introduces a chance of random despawning for mobs between 28 and 96 blocks away.

Spawn Limits in bukkit.yml

The global spawn limits in bukkit.yml cap how many mobs of each type can exist per player:

# bukkit.yml
spawn-limits:
  monsters: 40      # default: 70
  animals: 8        # default: 10
  water-animals: 3  # default: 5
  water-ambient: 3  # default: 20
  ambient: 1        # default: 15

These limits affect natural spawning only. They do not prevent mob spawners, breeding, or summoning from exceeding the cap. Still, reducing these values is the easiest way to limit entity count per chunk minecraft servers deal with from natural spawning. A monster limit of 40 (down from 70) noticeably reduces nighttime mob counts without making the game feel empty.

Per-Chunk Limits with Plugins

For true per-chunk entity caps, you need a plugin. The two best options are:

Insights

Insights is the most popular chunk limiting plugin. It lets you define limits for specific entity types per chunk:

# Insights limits.yml
limits:
  entities:
    ZOMBIE:
      limit: 24
    SKELETON:
      limit: 24
    VILLAGER:
      limit: 20
    ITEM:
      limit: 100
    ARMOR_STAND:
      limit: 40
    ITEM_FRAME:
      limit: 50

When a limit is reached, the plugin prevents new entities of that type from spawning or being placed in the chunk. Players receive a configurable message explaining the limit. This approach is transparent, predictable, and prevents lag machines based on entity cramming. See our lag machine detection guide for how Insights pairs with anti-grief measures.

Farm Limiter / Farm Control

Plugins like Farm Limiter specifically target mob farms. They count entities within a radius (not per chunk, but per configurable area) and prevent additional spawning when the limit is reached. This is useful when you want a limit of "50 mobs within 5 chunks" rather than per-chunk granularity.

Entity Activation Ranges

An alternative to hard limits is reducing how much work distant entities do. Spigot's entity activation range system puts entities to "sleep" when no player is close enough:

# spigot.yml
entity-activation-range:
  animals: 16        # default: 32
  monsters: 24       # default: 32
  raiders: 48
  villagers: 16      # default: 32
  misc: 8            # default: 16
  tick-inactive-villagers: false

When a mob is outside the activation range, it skips most AI processing (pathfinding, targeting, breeding checks). It still exists and counts toward mob caps, but it costs almost nothing in tick time. Setting tick-inactive-villagers to false means villagers outside the range do zero work, which is a major win for trading halls. For more on villager optimization, see our villager trading hall guide.

Merge Radius for Items and XP

Item entities and experience orbs can be merged to reduce entity count per chunk minecraft servers track:

# spigot.yml
merge-radius:
  item: 3.5        # default: 2.5
  exp: 6.0         # default: 3.0

Increasing the item merge radius from 2.5 to 3.5 means dropped items within 3.5 blocks of each other combine into a single stack. This significantly reduces entity count around mob farms and mining areas. The XP merge radius of 6.0 (up from 3.0) combines experience orbs more aggressively, which helps in grinder setups where thousands of orbs would otherwise pile up.

Clearing Entities Reactively

For emergency situations where entity counts have already spiraled out of control, these commands help:

/minecraft:kill @e[type=item,distance=..50]
/minecraft:kill @e[type=experience_orb,distance=..50]

ClearLag automates this with scheduled entity removal broadcasts. Configure it to remove dropped items and experience orbs every 5-10 minutes, with a 30-second warning so players can pick up their drops. This is a safety net, not a solution. The goal is to prevent excessive entity counts through proper limits, not to clean up the mess after it happens.

Balancing Limits with Gameplay

The challenge with entity limits is finding values that prevent lag without breaking gameplay. If you set the mob limit per chunk to 10, mob farms become useless and players will complain. If you set it to 200, a single chunk can still tank your TPS. Our recommended starting points:

  • Hostile mobs per chunk: 24-32
  • Passive mobs per chunk: 16-20
  • Villagers per chunk: 16-24
  • Items per chunk: 80-120
  • Armor stands per chunk: 30-50

Publish these limits on your server wiki or rules page. Players can design their builds around known constraints, which leads to fewer complaints than silent, unexplained mob disappearances. For the broader performance picture, see our 20 TPS optimization guide.

Need a server built for performance? Astroworld Hosting runs NVMe SSDs with optimized Paper configs on every plan.

Related Tools & Resources

🔧

Minecraft Tools

Calculators, generators & server tools

🧱

Item Database

Browse all Minecraft items, stats & recipes

⚒️

Crafting Recipes

Visual crafting guides for every recipe