关于 AntiRedstoneLag
AntiRedstoneLag 是一款轻量级、高性能的服务器保护插件,旨在消除红石延迟机器、零刻活塞循环和失控时钟,同时不会破坏合法的 vanilla 农场。
它原生构建于 Paper 和 Folia 区域线程之上,结合了周期性时钟指纹识别、自适应 MSPT/TPS 灵敏度缩放、非破坏性冻结、3D 法医快照、实时 BossBar HUD 诊断以及集成的 ClearLagg 引擎。
功能
现代 1.21+ 组件支持
- 全面覆盖现代 Minecraft 组件:酿造台、铜灯泡(所有氧化和涂蜡状态)、校准的斯科尔传感器和雕纹书架。
- 实时活塞速度追踪,以拦截零刻推/拉崩溃引擎。
周期性时钟指纹识别(农场免疫)
- 分析连续红石脉冲之间的间隔差值。
- 区分严格周期性的循环(具有接近零间隔方差的延迟机器)与突发式分拣系统、甘蔗农场、铁农场和西瓜收割机。
- 合法的玩家农场保持 100% 正常运行,无误报。
动态自适应灵敏度(MSPT 与 TPS 缩放)
- 当服务器 MSPT 健康时(<= 35ms / 20.0 TPS),自动授予更高的阈值余量。
- 当服务器负载过重时(MSPT >= 50ms 或 TPS < 18.0),动态收紧限制以保护刻率。
非破坏性分级冻结
- 暂时暂停并限速失控时钟(默认 15 秒),并在升级前通知所有者。
- 仅在机器在解冻后持续违反限制时,才会升级为掉落或移除物品。
法医快照与延迟回放 (/arl snapshot)
- 当触发延迟机器时,自动记录违规电路的 3D 集群扫描(7x7x7 边界框)。
- 捕获精确坐标、触发材料、峰值更新率、责任玩家名称/UUID、组件分解和相对方块位置。
- 在游戏中查看报告或直接传送至快照地点。
实时 BossBar 检查 HUD (/arl inspect)
- 可切换的管理员诊断 HUD,使用带有动态颜色编码(绿色、黄色、红色)和视觉尘埃粒子的冒险模式 BossBar 实时显示每秒区块更新数 (UPS)、MSPT 和 TPS。
集成 ClearLagg 引擎 (/arl clear)
- 完全可配置的地面物品和实体清理器,支持多模式倒计时广播(聊天栏、动作栏、标题、副标题)。
- 支持高级条件规则(例如
Arrow onGround、Boat !isMounted、Tnt liveTime>100)。
- 预配置了 SMP 实体白名单规则(村民、铁傀儡、悦灵、盔甲架、物品展示框、命名生物、驯服宠物和拴绳动物受到保护)。
- 贵重物品黑名单保护下界合金装备、鞘翅、不死图腾和信标。
性能
| 优化项 |
技术 |
收益 |
| 线程模型 |
原生 Paper 和 Folia 区域调度器 |
零跨区域阻塞,完全兼容 Folia |
| 集合类 |
FastUtil 原始映射 |
最小化内存分配,减少垃圾回收压力 |
| 配置 |
Okaeri Configs 带自动 .bk 备份 |
快速、类型安全的 YAML 序列化,具备数据安全备份 |
| 日志记录 |
零分配格式化 |
后台异步刷新,零主线程开销 |
安装
- 从 Modrinth 或 GitHub Releases 下载最新的
.jar 文件。
- 将 jar 文件放入服务器的
plugins/ 目录中。
- 重启服务器。
- 根据需要调整
plugins/AntiRedstoneLag/config.yml 和 messages.yml 中的设置。
要求: 运行在 Java 21+ 上的 Paper、Purpur 或 Folia 1.21.6 至 26.2。
命令与权限
| 命令 |
描述 |
权限 |
/arl help |
显示插件命令帮助 |
antiredstonelag.use |
/arl reload |
重新加载配置和消息 |
antiredstonelag.reload |
/arl stats |
查看监控的区块、方块和移除统计信息 |
antiredstonelag.stats |
/arl logs [download] |
查看或准备供下载的日志文件 |
antiredstonelag.logs |
/arl hotspots [page|export] |
查看或导出最高活动集群 |
antiredstonelag.hotspots |
/arl inspect [seconds] |
切换实时 BossBar 诊断 HUD |
antiredstonelag.inspect |
/arl snapshot [list|view|tp|clear] |
查看并传送到法医延迟快照 |
antiredstonelag.snapshot |
/arl clear [items|all|mobs|xp|count|cancel] |
清除地面物品和延迟实体 |
antiredstonelag.clear |
ClearLagg 引擎
AntiRedstoneLag 包含一个在 config.yml 中配置的条件规则清理器:
clearlagg:
enabled: true
interval-seconds: 300
countdown-seconds: [60, 30, 10, 5, 4, 3, 2, 1]
broadcast-mode: CHAT # CHAT, ACTION_BAR, TITLE, SUBTITLE, ALL, NONE
clear-ground-items: true
remove-entities:
- "Arrow onGround"
- "Spectral_Arrow onGround"
- "Trident onGround"
- "Snowball"
- "Egg"
- "Ender_Pearl"
- "Experience_Bottle"
- "Fireball"
- "Small_Fireball"
- "Dragon_Fireball"
- "Wither_Skull"
- "Shulker_Bullet"
- "Boat !isMounted"
- "Chest_Boat !isMounted"
- "Minecart !isMounted"
- "Minecart_Chest !isMounted"
- "Minecart_Hopper !isMounted"
- "Minecart_Tnt"
- "Minecart_Furnace"
- "Tnt liveTime>100"
entity-whitelist:
- "Player"
- "Villager"
- "Iron_Golem"
- "Allay"
- "Armor_Stand"
- "Item_Frame"
- "Glow_Item_Frame"
- "Painting"
- "Leash_Knot"
- "Interaction"
- "Text_Display"
- "Block_Display"
- "Item_Display"
- "* hasName"
- "* isTamed"
- "* isLeashed"
- "* isMounted"
item-blacklist:
- NETHER_STAR
- BEACON
- TOTEM_OF_UNDYING
- ELYTRA
- DIAMOND
- DIAMOND_BLOCK
- NETHERITE_INGOT
- NETHERITE_BLOCK
- NETHERITE_SWORD
- NETHERITE_PICKAXE
- NETHERITE_AXE
- NETHERITE_SHOVEL
- NETHERITE_HOE
- NETHERITE_HELMET
- NETHERITE_CHESTPLATE
- NETHERITE_LEGGINGS
- NETHERITE_BOOTS
项目披露与 AI 政策
根据 Modrinth 的项目披露指南和内容标准,以下披露适用于 AntiRedstoneLag:
AI 辅助披露
- 开发过程:本项目在代码重构、算法优化、文档结构化和 Paper/Folia API 兼容性测试方面使用了人工智能工具进行辅助开发。
- 人工贡献:架构设计、逻辑设计、集成选择、测试、调试和最终审查主要由人类开发人员主导并显著维护。
- 视觉素材:未使用任何由 AI 生成的项目图标、横幅或画廊素材。所有视觉材料均由人类创作或来源于标准排版和游戏渲染。
内容披露
- 广告/付费功能:无。AntiRedstoneLag 不包含游戏内广告、付费绕过机制或基于货币化的功能限制。
- 遥测/指标数据:包含标准的匿名 bStats 指标收集(服务器版本、Java 版本、玩家数量)。遥测功能可在
plugins/bStats/config.yml 中禁用。
- 外部系统交互:在启动时查询官方 Modrinth API (
https://api.modrinth.com/v2/project/5UOt11Yc/version),以便在新版本可用时通知服务器管理员。不会传输任何个人或服务器标识数据。
- 衍生内容:作为原始 Paper/Folia 防卡顿实现构建,使用了标准开源库(Okaeri Configs、FastUtil、bStats)。
支持与社区
许可证
MIT License - Copyright (c) 2025-2026
About AntiRedstoneLag
AntiRedstoneLag is a lightweight, high-performance server protection plugin designed to eliminate redstone lag machines, 0-tick piston loops, and runaway clocks without breaking legitimate vanilla farms.
Built natively for Paper and Folia regional threading, it combines periodicity clock fingerprinting, adaptive MSPT/TPS sensitivity scaling, non-destructive freezing, 3D forensic snapshots, live BossBar HUD diagnostics, and an integrated ClearLagg engine.
Features
Modern 1.21+ Component Support
- Full coverage of modern Minecraft components: Crafters, Copper Bulbs (all oxidation and waxed states), Calibrated Sculk Sensors, and Chiseled Bookshelves.
- Real-time piston velocity tracking to intercept 0-tick push/pull crash engines.
Periodicity Clock Fingerprinting (Farm Immunity)
- Analyzes the interval delta between consecutive redstone pulses.
- Distinguishes strictly periodic loops (lag machines with near-zero interval variance) from bursty sorting systems, sugarcane farms, iron farms, and melon harvesters.
- Legitimate player farms remain 100% functional without false flags.
Dynamic Adaptive Sensitivity (MSPT & TPS Scaling)
- Automatically grants higher threshold headroom when server MSPT is healthy (<= 35ms / 20.0 TPS).
- Dynamically tightens limits when the server is under heavy load (MSPT >= 50ms or TPS < 18.0) to protect the tick rate.
Non-Destructive Tiered Freezing
- Temporarily pause-throttles runaway clocks (default 15 seconds) and notifies the owner before escalating.
- Only escalates to item dropping or removal if a machine continuously violates limits after unfreezing.
Forensic Snapshots and Lag Replay (/arl snapshot)
- Automatically records a 3D cluster scan (7x7x7 bounding box) of offending circuits when lag machines are tripped.
- Captures exact coordinates, trigger material, peak update rates, culprit player name/UUID, component breakdown, and relative block positions.
- View reports in-game or teleport directly to the snapshot site.
Live BossBar Inspection HUD (/arl inspect)
- Toggleable admin diagnostic HUD that displays Chunk Updates Per Second (UPS), MSPT, and TPS in real time using an Adventure BossBar with dynamic color coding (Green, Yellow, Red) and visual dust particles.
Integrated ClearLagg Engine (/arl clear)
- Fully configurable ground item and entity cleaner with multi-mode countdown broadcasts (Chat, Action Bar, Title, Subtitle).
- Supports advanced conditional rules (e.g.
Arrow onGround, Boat !isMounted, Tnt liveTime>100).
- Pre-configured with SMP entity whitelist rules (Villagers, Iron Golems, Allays, Armor Stands, Item Frames, named mobs, tamed pets, and leashed animals are protected).
- Dropped valuables blacklist protects Netherite gear, Elytras, Totems, and Beacons.
Performance
| Optimization |
Technique |
Benefit |
| Threading Model |
Native Paper and Folia Regional Schedulers |
Zero cross-region blocking and complete Folia compatibility |
| Collections |
FastUtil Primitive Maps |
Minimal memory allocations and reduced garbage collection pressure |
| Configuration |
Okaeri Configs with Automatic .bk Backups |
Fast, type-safe YAML serialization with data safety backups |
| Logging |
Zero-Allocation Formatting |
Background asynchronous flushing with zero main-thread overhead |
Installation
- Download the latest
.jar from Modrinth or GitHub Releases.
- Place the jar file into your server's
plugins/ directory.
- Restart your server.
- Adjust settings in
plugins/AntiRedstoneLag/config.yml and messages.yml if desired.
Requirements: Paper, Purpur, or Folia 1.21.6 through 26.2 running on Java 21+.
Commands and Permissions
| Command |
Description |
Permission |
/arl help |
Show plugin command help |
antiredstonelag.use |
/arl reload |
Reload configuration and messages |
antiredstonelag.reload |
/arl stats |
View monitored chunks, blocks, and removal stats |
antiredstonelag.stats |
/arl logs [download] |
View or prepare log files for download |
antiredstonelag.logs |
/arl hotspots [page|export] |
View or export top activity clusters |
antiredstonelag.hotspots |
/arl inspect [seconds] |
Toggle real-time BossBar diagnostic HUD |
antiredstonelag.inspect |
/arl snapshot [list|view|tp|clear] |
View and teleport to forensic lag snapshots |
antiredstonelag.snapshot |
/arl clear [items|all|mobs|xp|count|cancel] |
Clear ground items and lag entities |
antiredstonelag.clear |
ClearLagg Engine
AntiRedstoneLag includes a conditional rule cleaner configured in config.yml:
clearlagg:
enabled: true
interval-seconds: 300
countdown-seconds: [60, 30, 10, 5, 4, 3, 2, 1]
broadcast-mode: CHAT # CHAT, ACTION_BAR, TITLE, SUBTITLE, ALL, NONE
clear-ground-items: true
remove-entities:
- "Arrow onGround"
- "Spectral_Arrow onGround"
- "Trident onGround"
- "Snowball"
- "Egg"
- "Ender_Pearl"
- "Experience_Bottle"
- "Fireball"
- "Small_Fireball"
- "Dragon_Fireball"
- "Wither_Skull"
- "Shulker_Bullet"
- "Boat !isMounted"
- "Chest_Boat !isMounted"
- "Minecart !isMounted"
- "Minecart_Chest !isMounted"
- "Minecart_Hopper !isMounted"
- "Minecart_Tnt"
- "Minecart_Furnace"
- "Tnt liveTime>100"
entity-whitelist:
- "Player"
- "Villager"
- "Iron_Golem"
- "Allay"
- "Armor_Stand"
- "Item_Frame"
- "Glow_Item_Frame"
- "Painting"
- "Leash_Knot"
- "Interaction"
- "Text_Display"
- "Block_Display"
- "Item_Display"
- "* hasName"
- "* isTamed"
- "* isLeashed"
- "* isMounted"
item-blacklist:
- NETHER_STAR
- BEACON
- TOTEM_OF_UNDYING
- ELYTRA
- DIAMOND
- DIAMOND_BLOCK
- NETHERITE_INGOT
- NETHERITE_BLOCK
- NETHERITE_SWORD
- NETHERITE_PICKAXE
- NETHERITE_AXE
- NETHERITE_SHOVEL
- NETHERITE_HOE
- NETHERITE_HELMET
- NETHERITE_CHESTPLATE
- NETHERITE_LEGGINGS
- NETHERITE_BOOTS
Project Disclosures and AI Policy
In accordance with Modrinth's project disclosure guidelines and content standards, the following disclosures apply to AntiRedstoneLag:
AI Assistance Disclosure
- Development Process: This project was developed with the assistance of artificial intelligence tools for code refactoring, algorithm optimization, documentation structuring, and Paper/Folia API compatibility testing.
- Human Contribution: Architecture, logic design, integration choices, testing, debugging, and final review are directed and maintained primarily and significantly by human developers.
- Visual Assets: No AI-generated project icons, banners, or gallery assets are utilized. All visual materials are human-created or sourced from standard typography and game renders.
Content Disclosures
- Advertising / Paid Features: None. AntiRedstoneLag contains no in-game advertisements, paid bypasses, or monetized feature gating.
- Telemetry / Metrics: Includes standard anonymous bStats metric collection (server version, Java version, player count). Telemetry can be disabled in
plugins/bStats/config.yml.
- External System Interactions: Queries the official Modrinth API (
https://api.modrinth.com/v2/project/5UOt11Yc/version) on startup to notify server administrators when a newer release is available. No personal or server identification data is transmitted.
- Derivative Content: Built as an original Paper/Folia lag prevention implementation utilizing standard open-source libraries (Okaeri Configs, FastUtil, bStats).
Support and Community
License
MIT License - Copyright (c) 2025-2026
评论 0
登录后参与评分
还没有评论,来抢沙发吧