Back to Mods

Saro's ClearLag

Clears dropped items and stray entities on a timer. Named, tamed and leashed mobs stay.

Header

Entities pile up on a server and the TPS goes down with them. This runs a clear cycle on a timer, every 5 minutes out of the box, and sweeps dropped items, hostile mobs, projectiles and XP orbs. Named pets, tamed animals and leashed mobs are left alone by default, because deleting somebody's dog is a good way to lose a player. Server-side.

Tip: Works in singleplayer too.

Features

Protection options

Protection Description Default
Named Entities Mobs with a name tag are safe On
Tamed Animals Pets (cats, dogs, parrots, etc.) On
Leashed Mobs Entities on a lead are ignored On
Player Radius Entities within X blocks of players are spared 0 (off)

Entity filtering

Entity Type Default
Items (dropped) On
Hostile mobs On
Projectiles On
XP Orbs On
Boats Off
Minecarts Off

Blacklist / Whitelist

Blacklist mode (default): only listed entities are cleared.
Whitelist mode: only listed entities are cleared, all others ignored.
Supports entities from any mod using modid:entity_type.

Default blacklist: minecraft:item, minecraft:arrow, minecraft:experience_orb, minecraft:zombie, minecraft:skeleton, minecraft:creeper, minecraft:spider, minecraft:enderman

Warnings

Chat warnings at 30, 10, 5, 3, and 1 seconds before each clear. Message text supports {count} and {time} placeholders.

Commands

Requires OP Level 2.

Command Description
/clearlag clear Run a clear cycle immediately
/clearlag count Preview how many entities would be cleared
/clearlag timer Show time until next auto-clear
/clearlag reset Reset the auto-clear timer
/clearlag info Show current config settings
/clearlag reload Reload config and restart scheduler

Configuration

config/sarosclearlag-common.toml:

Option Default Range Description
autoCleanEnabled true - Enable auto-clear
autoCleanInterval 300 30-3600 Interval in seconds
showWarnings true - Show warnings
warningTime 30 5-120 Seconds before clear to warn
useWhitelistMode false - Whitelist instead of blacklist
protectNamedEntities true - Protect named entities
protectTamedEntities true - Protect tamed animals
protectLeashedEntities true - Protect leashed mobs
protectionRadiusPlayers 0 0-128 Radius around players
broadcastClearMessage true - Broadcast to all players

Note: This wiki is the documentation. Questions and bug reports are faster on the Discord server.

Featured

Need a custom mod?

Tell me what the mod should do and I build it.

Hire me on Fiverr