Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
hAntiLagMachines
Detect lag machines and control crowded mob chunks
hAntiLagMachines 2.2 detects specific machine patterns and bursts of activity, from dense redstone grids to minecart piles and pistons moving armor stands. Enable and tune each module separately. Depending on the check, it can cancel an action, quarantine a running mechanism, or remove parts of it. Inspect saved removals and restore affected blocks or entities by incident ID.
Nine machine checks
redstoneGrid— dust towers, flat grids, multilayer repeater circuits, and piston hybrids. Checks repeated signal changes or piston movement alongside the local layout.pistonRapid— repeated extensions across many distinct pistons. Quarantines the participating pistons after confirmation.pistonSlimeWall— active multilayer slime or honey walls with pistons and redstone. Stops participating pistons and can remove parts after repeated quarantines.pistonArmorStand— dense stacks of armor stands around pistons. Can block stand spawns, machine part placement, or piston movement and clean up the local cluster.gravityCobweb— batches of falling sand, gravel, and other gravity blocks around cobwebs. Reacts to support removal and bursts of falling entities.minecartRail— a full-height per-chunk minecart cap that checks placement, spawning, and incoming carts. Cleanup mode also checks rail clusters.boatBubble— concentrated boats, including bubble-column setups, and bursts of boat spawns. Can prevent new boats or clear a cluster according to the settings.leverSpam— rapid consecutive clicks by the same player on the same lever. The first threshold quarantines the lever; continued clicking can reach a second threshold that removes it.sculkSensor— dense groups of normal or calibrated sensors and repeated power changes. Quarantine suppresses activity; repeated detections can remove nearby sensors.
Quarantine and limit responses
For redstoneGrid, pistonRapid, and pistonSlimeWall, configure how many independent activity windows must match, how much the participating blocks must overlap, and how many candidate checks may run per tick. Three matching windows are required by default. cleanup.quarantinesBeforeRemoval sets the number of quarantines needed before removal; 0 keeps quarantine without removal. The rapid piston check defaults to quarantine only.
Minecarts: removeNew (the default) preserves existing carts and rails inside the chunk; cancel blocks new carts and moves incoming carts back; remove allows local minecart and rail cleanup. The default cap is 12 minecarts per chunk.
Mob limits for connected chunks
The mobChunkLimit module groups adjacent chunks containing tracked mobs. includeDiagonals includes corners, maximumChunks caps the group size, and limits sets the population cap for each size. A spawn is denied if it would exceed a limit or join too many populated chunks.
A types limit replaces the general population limit for a spawn of that mob type and scales with the group size. Set it to 0 to block that type's checked spawns. Recognized trial-spawner mobs are excluded. Small size-one slimes can be counted individually or grouped as one per chunk.
Example for modules/mobChunkLimit.yml: the general limit is 17 for one chunk and 22 for two. The Wither limit is 3 in one chunk and 4 in a group of two.
settings:
enable: true
limit:
types:
WITHER: 3
connectedChunks:
includeDiagonals: true
maximumChunks: 2
limits:
'1': 17
'2': 22
Mob AI profiles
Set separate profiles for spawners, spawn eggs, and other spawn sources. A '*' profile supplies the default for its source; a mob type entry overrides it. Configure base AI, awareness, targeting, and item pickup. Paper and Folia provide additional aggression and navigation controls, including door behavior.
Incident history, export, and restore
/hantilagmachines chunk [page] shows saved removals that affected your current chunk. Each entry has an ID, time, coordinates, check type, and counts of removed blocks and entities. Hover over the entry for diagnostic details and nearby players.
Export. Use the history button to save current surroundings and saved removal snapshots in one TXT. For a custom area, set two corners with pos1 and pos2, then run copy. Export leaves the world as it is and saves files in plugins/hAntiLagMachines/schematics.
Restore. The history button asks for confirmation. /hantilagmachines restore <id> immediately restores the saved blocks and entities for that ID. Current blocks at saved positions are overwritten. The incident is then marked as restored.
History and snapshots use local SQLite; logs.txt keeps readable diagnostics. Cleanup and export run in batches, and individual modules have their own scan limits.
Incident signs and WorldGuard bypasses
After a removal, the plugin can place a protected sign with its date and incident ID. Configure material, sides, appearance, and MiniMessage text in protectionSign.yml. Administrators can right-click the sign for incident details. On restore, signs matching the incident ID can be removed automatically.
WorldGuard is optional. Use settings.worldGuard.bypassRegions to bypass specific checks in selected regions and worlds. This example bypasses only two checks in the spawn region of world:
settings:
worldGuard:
enable: true
bypassRegions:
spawn:
worlds:
- world
checks:
- redstoneGrid
- pistonRapid
Commands and permission
/hantilagmachines mobchunks— show the largest tracked mob clusters in loaded chunks, with coordinates, mob counts, and group sizes./hantilagmachines chunk [page]— show saved removal history in your current chunk./hantilagmachines restore <id>— restore saved objects for the incident./hantilagmachines pos1and/hantilagmachines pos2— set selection corners at your current position./hantilagmachines copy— export the selection as TXT;/hantilagmachines copy cancel— cancel the export.
All commands require hantilagmachines.admin, granted to operators by default.
Compatibility and installation
Minecraft 1.21.x · Spigot, Paper, and Folia · Java 21 or newer. Basic protection has no required plugins. Region bypasses use WorldGuard and its WorldEdit dependency.
- Place
hAntiLagMachines-2.2.jarinpluginsand start the server. - Set
install: enorinstall: ruinplugins/hAntiLagMachines/locale.yml. - Run
/hantilagmachines installor restart to select the locale and generate missing files. - Configure the modules and restart after editing their settings.
Configuration files
modules/*.yml— individual checks, thresholds, radii, limits, and responses.materials.yml— which materials the checks consider.config.yml— processing budgets, history, export, and WorldGuard bypasses.protectionSign.yml— incident signs;messages.ymlandlogs.yml— messages and diagnostics.


