Skip to content

Xyness/XAntiLag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

XAntiLag

Server optimization addon for XCore. Provides a comprehensive suite of performance tools for Minecraft servers running Paper 1.21.1+ with full Folia compatibility.

Features

Chunk Block Limiter

  • Configurable per-material block limits per chunk
  • Automatic scanning and enforcement
  • Handles pistons, explosions, fire, block placement/breaking
  • Anti-spam messaging for players

Chunk Entity Limiter

  • Configurable per-entity-type limits per chunk
  • Periodic enforcement every 5 minutes

Tile Entity Limiter

  • Configurable maximum tile entities per chunk (default: 256)
  • Prevents placing new tile entities when limit is reached

Item Stacker

  • Merges nearby identical items into stacks
  • Configurable display format (MiniMessage, e.g. <aqua>x%count%)
  • Proper overflow handling for hopper and player pickup
  • Configurable pickup delay and excluded items

Mob Stacker

  • Merges nearby identical mobs into stacks
  • Configurable display format (MiniMessage, e.g. <red>x%count%)
  • Kill-all or kill-one-by-one modes
  • Drop multiplication for stacked kills
  • Cooked drops when mobs are killed by fire
  • Slime split handling (stacked slimes don't split)
  • Configurable excluded entity types

Custom Mob AI

  • Reduces pathfinding calculations to lower CPU usage
  • Distance-based scaling — mobs far from players get maximum AI reduction, mobs nearby keep normal behavior
  • Configurable movement speed and AI reduction percentage
  • Spawner entities get all AI removed
  • Excluded entity types for important mobs

Villager Optimizer

  • Disables AI awareness for villagers far from players
  • Configurable distance threshold (default: 32 blocks)
  • Periodic check every 5 seconds
  • Villagers regain full AI when a player approaches

Anti-AFK System

  • Configurable idle timeout
  • Blindness/darkness effects on AFK players
  • Optional teleportation to designated location
  • Custom view/simulation distance for AFK players
  • Automatic detection via movement, interaction, chat, commands

Redstone Clock Limiter

  • Detects repeater/comparator clocks exceeding threshold
  • Automatically replaces with a warning sign
  • Per-chunk redstone update rate limiting (configurable cap per second)

Hopper Rate Limiter

  • Limits item transfers per hopper per second
  • Prevents lag from hopper chains and large sorting systems
  • Configurable max transfers (default: 8/sec)

Entity Collision Limiter

  • Disables collision for non-player entities on spawn
  • Reduces entity collision processing overhead
  • Useful for high-density mob farms

Clearlag

  • Scheduled entity removal with configurable interval (default: 15 minutes)
  • Configurable warnings — set any number of warning times (default: 60s, 20s)
  • All messages in lang.yml (fully translatable)
  • Sound effects for warnings and cleanup
  • Entity type filter, kill monsters option, exclude named entities

Spawn Rate Limiter

  • Reduces natural mob spawn rates globally or per world
  • Configurable percentage (100 = vanilla, 50 = half, 0 = none)
  • Integrates with TPS monitor for automatic adjustment

Farmland Optimizer

  • Reduces random tick processing for crops in large farms
  • Configurable crop count threshold per chunk
  • Configurable skip rate percentage

TPS Monitor

  • Gradual optimization levels — multiple thresholds with different actions
  • Example: 18 TPS → reduce spawn rate, 16 TPS → reduce distances, 14 TPS → force clearlag
  • Configurable check interval
  • Auto-recovery when TPS improves

Anti Chunk-Loader Detection

  • Detects entity-in-portal chunk loading exploits
  • Configurable action: remove entity or log warning

TNT Rate Limiter

  • Limits TNT/TNT minecart explosions per chunk per second
  • Configurable max explosions (default: 5/s)

Web Dashboard

  • REST API endpoints for server optimization data
  • GET /api/xantilag/status - feature status, TPS, entity count, loaded chunks
  • GET /api/xantilag/chunks/top - top 10 most expensive chunks
  • GET /api/xantilag/stats - clearlag stats, stacker configuration

Commands

Command Permission Description
/chunks xantilag.command.chunks Paginated GUI of every loaded chunk with full breakdown (entities, tile entities, redstone, top 5 types, cost). Left-click teleports to the chunk center.
/chunks top xantilag.command.chunks Same GUI as /chunks but sorted by descending cost.
/setafklocation xantilag.command.setafklocation Set the AFK teleport location
/xantilag reload xantilag.admin Reload configuration
/xantilag status xantilag.admin Show all feature statuses

PlaceholderAPI

Placeholder Description
%xantilag_afk% Returns "(AFK) " if the player is AFK, empty otherwise
%xantilag_isAfk% Returns "yes" or "no"
%xantilag_clearlag% Time remaining until next clearlag

Configuration

All features can be independently enabled/disabled in config.yml. See the default configuration for all available options.

Requirements

  • Paper 1.21.1+
  • Java 21+
  • XCore (framework)
  • Optional: PlaceholderAPI

About

Boost your TPS: stack items and mobs, cap chunk entities, redstone clock.. Paper & Folia compatible.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors