Project

Saro's ClearLag

Powerful server-side optimization tool to automatically clear lag-causing entities with advanced filtering and protection.

Header

Overview

Saro's ClearLag is a server-side optimization mod designed to keep your server running smoothly. It periodically removes lag-inducing entities (like dropped items or excess mobs) while offering robust protection systems to ensure important entities—like named pets or leashed animals—are never accidentally deleted.

💡 Tip: Server-Side Only - Clients don't need this mod installed! Also works in singleplayer.

Features

Key Features

🛡️ Advanced Protection (4 Options)

Never lose what matters. The mod automatically protects:

Protection Description Default
Named Entities Any mob with a name tag is 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)

⚙️ Smart Filtering (6 Entity Types)

Entity Type Description Default
Items Dropped items ✅ On
Mobs Hostile monsters ✅ On
Projectiles Arrows, snowballs, etc. ✅ On
XP Orbs Experience orbs ✅ On
Boats All boat types ❌ Off
Minecarts All minecart types ❌ Off

📋 Whitelist/Blacklist System

  • Blacklist Mode (Default): Only listed entities are cleared.
  • Whitelist Mode: Only listed entities are cleared, all others ignored.
  • Mod Compatibility: Works with entities from ANY mod (modid:entity_type).

Default Blacklist:

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

🤖 Automation & Warnings

  • Auto-Clear: Configurable interval (Default: 5 minutes).
  • Warnings: Chat warnings at 30, 10, 5, 3, and 1 seconds before clearing.
  • Custom Messages: Own text with {count} and {time} placeholders.

Commands

Requires OP Level 2

Command Description
/clearlag Shows help
/clearlag clear Manually 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
/clearlag help Shows command help

Configuration

All settings in config/sarosclearlag-common.toml:

Auto Clear Settings

Option Default Range Description
autoCleanEnabled true - Enable auto-clear
autoCleanInterval 300 30-3600 Interval in seconds
showWarnings true - Show warnings
warningTime 30 5-120 Warning time in seconds before clear

Entity Filtering

Option Default Description
useWhitelistMode false Use whitelist instead of blacklist
entityBlacklist (see above) Entity types to clear
entityWhitelist ["minecraft:item"] Entities for whitelist mode

Clear Settings

Option Default Description
clearItems true Clear dropped items
clearMobs true Clear hostile mobs
clearProjectiles true Clear projectiles
clearBoats false Clear boats
clearMinecarts false Clear minecarts
clearXpOrbs true Clear XP orbs

Protection Settings

Option Default Range Description
protectNamedEntities true - Protect named entities
protectTamedEntities true - Protect tamed animals
protectLeashedEntities true - Protect leashed mobs
protectionRadiusPlayers 0 0-128 Protection radius around players

Messages

Option Default Description
broadcastClearMessage true Broadcast message to all
clearMessage "§a[Clearlag] Cleared {count} entities!" Clear message
warningMessage "§e[Clearlag] Warning! ..." Warning message

Note: This wiki serves as documentation. For active discussion, please join the Discord Server.

Featured

Need a Custom Mod?

Concept to code. I build professional, optimized mods tailored to your exact specifications.

Hire me on Fiverr