How to Reduce Entity Lag on a Server

NOTE: This article is specifically for Minecraft Java Edition servers.

Entities are important to Minecraft gameplay but are notorious for causing lag on any server, regardless of server type. Entity lag occurs when many entities are present in a small area. If not addressed, too many entities can affect server performance and lead to chunk corruption.

What are Entities?

An entity in Minecraft is any object capable of moving, interacting with the player, storing values, or having a non-cuboid shape. When debugging entity lag, it is important to know the two types of entities: regular entities and tile entities.

Tile Entities vs Regular Entities

The main difference between the two types of entities is whether they are a block in the world or not. Regular entities are general objects that consist of mobs, dropped items, projectiles, vehicles, and falling blocks. On the other hand, a tile entity is a block with associated unique data, such as a chest’s inventory and redstone’s power level.

Regular entities generally cause more lag than tile entities. Since regular entities can move around they have a lot of additional physics applied to them such as gravity, collisions, and AI if necessary. Tile entities on the other hand are static blocks and therefore have dramatically fewer features and lag potential. Because of this, one hopper minecart is more impactful on entity lag than a row of hoppers.

Removing Entities to Reduce Entity Lag

With Plugins

Removing excess entities is the simplest way to reduce entity lag on your server. This can easily be done using a plugin. For example, ClearLagg automatically removes entities and can be configured to protect certain regions or entity types.

You can also use a plugin to blacklist items/entities that cause entity lag. BanItem allows you to ban lag-causing items and supports permissions to allow trusted players access to blacklisted items. Some items we suggest banning are:

  • Armour Stands & Item Frames - These entities are usually cosmetic but can be used to create lag machines.
  • Redstone Repeaters - These entities can be used in lag machines to rapidly activate large amounts of tile entities.

Without Plugins (Vanilla / Modded)

If you do not wish to use plugins on your server, you can remove entities through scheduled tasks at a set interval. Depending on the entities you wish to remove, here are some sample tasks and their effects:

kill @e[type=minecraft:item] Executing this command will only delete dropped items.
kill @e[type=minecraft:REGISTRY_NAME] Replace REGISTRY_NAME with the registry name for the entity you wish to delete. You can schedule multiple instances of this task to delete hostile mobs.
kill @e[type=!player] Executing this command will delete every entity except players.

If you are still experiencing entity lag on your server, we recommend taking a Timings report to identify problematic entities. You may also consider installing additional plugins on your server to reduce lag.

If you require any further assistance, please contact our support at:

Mitchell Smith

Managing Director @ Shockbyte

  • 26 Users Found This Useful
Was this answer helpful?

Related Articles

How to Analyze a Timings v2 Report

Pre-requisites: You can create a timings report by following our guide. Once you have the...

Optimizing bukkit.yml to Reduce Lag

NOTE: This article is specifically for Minecraft Java Edition servers, and depends on...

Optimizing spigot.yml to Reduce Lag

NOTE: This article is specifically for Minecraft Java Edition servers, and depends on Spigot or...

How to Allocate More Memory to your Minecraft Client

When you are running a large variety of plugins or mods on your server, sometimes your client...

How to Analyze any Timings Report

Are you experiencing lag on your Minecraft server? Lag can be eliminated by finding and resolving...